Tutorial : http://www.django-rest-framework.org/tutorial/1-serialization/#
Error message:
(env)[root@iZ281jn3x0bZ tutorial]# python manage.py runserver
115.xx.xxx.32:8000
Performing system checks...
Unhandled exception in thread started by <function wrapper at 0x2641a28>
Traceback (most recent call last):
File
"/root/django/rest/env/lib/python2.7/site-packages/django/utils/autoreload.py",
line 226, in wrapper
fn(*args, **kwargs)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
line 121, in inner_run
self.check(display_num_errors=True)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/core/management/base.py",
line 374, in check
include_deployment_checks=include_deployment_checks,
File
"/root/django/rest/env/lib/python2.7/site-packages/django/core/management/base.py",
line 361, in _run_checks
return checks.run_checks(**kwargs)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/core/checks/registry.py",
line 81, in run_checks
new_errors = check(app_configs=app_configs)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/core/checks/urls.py",
line 14, in check_url_config
return check_resolver(resolver)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/core/checks/urls.py",
line 24, in check_resolver
for pattern in resolver.url_patterns:
File
"/root/django/rest/env/lib/python2.7/site-packages/django/utils/functional.py",
line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/urls/resolvers.py",
line 313, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/utils/functional.py",
line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File
"/root/django/rest/env/lib/python2.7/site-packages/django/urls/resolvers.py",
line 306, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module
__import__(name)
File "/root/django/rest/tutorial/tutorial/urls.py", line 20, in <module>
url(r'^', include('snippets.urls')),
File
"/root/django/rest/env/lib/python2.7/site-packages/django/conf/urls/__init__.py",
line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module
__import__(name)
File "/root/django/rest/tutorial/snippets/urls.py", line 5, in <module>
url(r'^snippets/$', views.snippet_list),
AttributeError: 'module' object has no attribute 'snippet_list'
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/0270f89f-25fc-4b9f-b60d-73608397b563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.