(venv) C:\Users\Дом\Desktop\Py\PY\django_projects\web\first>manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\threading.py", line 973, in _bootstrap_inner
self.run()
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\management\base.py", line 419, in check
all_issues = checks.run_checks(
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\checks\registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 412, in check
for pattern in self.url_patterns:
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\utils\functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 591, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\first\first\urls.py", line 25, in <module>
path('', include('blog.urls')),
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\first\blog\urls.py", line 6, in <module>
path('<int:id/>', article, name='articl'),
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\conf.py", line 70, in _path
pattern = Pattern(route, name=name, is_endpoint=True)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 259, in __init__
self.converters = _route_to_regex(str(route), is_endpoint)[1]
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 229, in _route_to_regex
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: URL route '<int:id/>' uses parameter name 'id/' which isn't a valid Python identifier.
def article(request, id):
return HttpResponse(‘<h1>Hello<\h1>)
(venv) C:\Users\Дом\Desktop\Py\PY\django_projects\web\first>manage.py runserver
Watching for file changes with StatReloader
Performing system checks...
Exception in thread django-main-thread:
Traceback (most recent call last):
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\threading.py", line 973, in _bootstrap_inner
self.run()
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\management\base.py", line 419, in check
all_issues = checks.run_checks(
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\checks\registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
return check_method()
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 412, in check
for pattern in self.url_patterns:
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\resolvers.py", line 591, in urlconf_module
return import_module(self.urlconf_name)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\first\first\urls.py", line 25, in <module>
path('', include('blog.urls')),
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\venv\lib\site-packages\django\urls\conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "C:\Users\Дом\AppData\Local\Programs\Python\Python39\lib\importlib\init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\Дом\Desktop\Py\PY\django_projects\web\
from django.urls import path
from .views import *
urlpatterns = [
path('', home),
path('test/', test),
path('<int:id/', article, name='arcicl'),
]
#xnj означает name?
bot.sendMessage(chat_id='id' text="текст")
получения дополнительных сведений см. about_Execution_Policies по адресу https:/go.microsoft.com/fwlink/?LinkID=135170