I'm following the getting started tutorial 01 and running into issues after 
creating the polls app. Can someone please help?

I'm using Python 3.6.1 and Django 1.11.

Here's the detailed trace:

Performing system checks...
Unhandled exception in thread started by <function 
check_errors.<locals>.wrapper at 0x04222810>
Traceback (most recent call last):
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py",
 
line
227, in wrapper
    fn(*args, **kwargs)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\ru
nserver.py", line 125, in inner_run
    self.check(display_num_errors=True)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py",
 
l
ine 359, in check
    include_deployment_checks=include_deployment_checks,
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py",
 
l
ine 346, in _run_checks
    return checks.run_checks(**kwargs)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\checks\registry.py",
 
l
ine 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\checks\urls.py",
 
line
16, in check_url_config
    return check_resolver(resolver)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\checks\urls.py",
 
line
26, in check_resolver
    return check_method()
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py",
 
line 25
4, in check
    for pattern in self.url_patterns:
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py",
 
line
35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py",
 
line 40
5, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", 
self.urlconf_module)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py",
 
line
35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py",
 
line 39
8, in urlconf_module
    return import_module(self.urlconf_name)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py",
 
line 126, in import_modu
le
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in 
_call_with_frames_removed
  File "C:\Users\cephalin\Repos\django\mysite\mysite\urls.py", line 20, in 
<module>
    url(r'^polls/', include('polls.urls')),
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\conf\urls\__init__.py",
 
lin
e 50, in include
    urlconf_module = import_module(urlconf_module)
  File 
"C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py",
 
line 126, in import_modu
le
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in 
_call_with_frames_removed
  File "C:\Users\cephalin\Repos\django\mysite\polls\urls.py", line 6, in 
<module>
    url(r'^$', views.index, name='index'),
AttributeError: module 'polls.views' has no attribute 'index'

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b77a1a74-b07f-4277-98da-23b46ca7d2e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to