You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following recipe in Chapter 3 from Designing a pastebin to the point where urls are configured and http://127.0.0.1/pastebin is suggested to be visited, produces error in django server:
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/usr/lib/python3/dist-packages/django/core/management/commands/runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/usr/lib/python3/dist-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line 13, in check_url_config
return check_resolver(resolver)
File "/usr/lib/python3/dist-packages/django/core/checks/urls.py", line 23, in check_resolver
return check_method()
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 416, in check
for pattern in self.url_patterns:
File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 602, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python3/dist-packages/django/utils/functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/lib/python3/dist-packages/django/urls/resolvers.py", line 595, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/d/nextcloud/programming/django/djen_project/djen_project/urls.py", line 21, in
path('pastebin/', include('pastebin.urls'))
File "/usr/lib/python3/dist-packages/django/urls/conf.py", line 34, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/d/nextcloud/programming/django/djen_project/pastebin/urls.py", line 2, in
from .views import PasteCreate
File "/home/d/nextcloud/programming/django/djen_project/pastebin/views.py", line 3, in
class PasteCreate(CreateView):
File "/home/d/nextcloud/programming/django/djen_project/pastebin/views.py", line 4, in PasteCreate
model = Paste
NameError: name 'Paste' is not defined
The text was updated successfully, but these errors were encountered:
Following recipe in Chapter 3 from Designing a pastebin to the point where urls are configured and http://127.0.0.1/pastebin is suggested to be visited, produces error in django server:
The text was updated successfully, but these errors were encountered: