M
M
Michael La2019-08-28 20:44:13
Django
Michael La, 2019-08-28 20:44:13

Error starting Django server. What to do with this error?

Here is the error itself:

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x03B85B28>
Traceback (most recent call last):
  File "C:\Python37-32\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Python37-32\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run
    self.check(display_num_errors=True)
  File "C:\Python37-32\lib\site-packages\django\core\management\base.py", line 379, in check
    include_deployment_checks=include_deployment_checks,
  File "C:\Python37-32\lib\site-packages\django\core\management\base.py", line 366, in _run_checks
    return checks.run_checks(**kwargs)
  File "C:\Python37-32\lib\site-packages\django\core\checks\registry.py", line 71, in run_checks
    new_errors = check(app_configs=app_configs)
  File "C:\Python37-32\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "C:\Python37-32\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver
    return check_method()
  File "C:\Python37-32\lib\site-packages\django\urls\resolvers.py", line 396, in check
    for pattern in self.url_patterns:
  File "C:\Python37-32\lib\site-packages\django\utils\functional.py", line 37, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Python37-32\lib\site-packages\django\urls\resolvers.py", line 533, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "C:\Python37-32\lib\site-packages\django\utils\functional.py", line 37, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Python37-32\lib\site-packages\django\urls\resolvers.py", line 526, in urlconf_module
    return import_module(self.urlconf_name)
  File "C:\Python37-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "D:\CODE\Django_GoshaDudar-master\myfirst\myfirst\urls.py", line 22, in <module>
    path('articles/', include(articles.urls)),
NameError: name 'articles' is not defined

And here is the urls.py code (main, in the project)
from django.contrib import admin
from django.urls import include, path
from django.conf.urls import include


urlpatterns = [
  path('articles/', include(articles.urls)),
    path('admin/', admin.site.urls),
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Keofaste, 2019-08-28
@Mihail_Tropin

take articles.urls in quotes
path('articles/', include('articles.urls')),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question