title: What is causing this error on part 3 of Django tutorial?
body: <p>I have run into an issue while working through the Django tutorial, specifically when adding more views to the poll application.  For reference, this is the beginning of the section that trips me up:  <a href="https://docs.djangoproject.com/en/1.5/intro/tutorial03/#writing-more-views" rel="noreferrer">https://docs.djangoproject.com/en/1.5/intro/tutorial03/#writing-more-views</a></p>
  
  <p>Prior to that section, I can get the <em>polls/</em> view to show up with no issue.  But when I add three additional views to make <em>polls/views.py</em> look like this:</p>
  
  <pre><code>def detail(request, poll_id):
      return HttpResponse("You're looking at poll %s." % poll_id)
  
  def results(request, poll_id):
      return HttpResponse("You're looking at the results of poll %s." % poll_id)
  
  def vote(request, poll_id):
      return HttpResponse("You're voting on poll %s." % poll_id)
  </code></pre>
  
  <p>and then make <em>polls/urls.py</em> look like this:</p>
  
  <pre><code>from django.conf.urls import patterns, url
  
  from polls import views
  
  urlpatterns = patterns('',
      # ex: /polls/
      url(r'^$', views.index, name='index'),
      # ex: /polls/5/
      url(r'^(?P&lt;poll_id&gt;\d+)/$', views.detail, name='detail'),
      # ex: /polls/5/results/
      url(r'^(?P&lt;poll_id&gt;\d+)/results/$', views.results, name='results'),
      # ex: /polls/5/vote/
      url(r'^(?P&lt;poll_id&gt;\d+)/vote/$', views.vote, name='vote'),
  )
  </code></pre>
  
  <p>I get an error.  As an aside, my mysite <em>ROOT_URLCONF</em> is pointing to <em>mysite/urls.py</em> which looks like this:</p>
  
  <pre><code>from django.conf.urls import patterns, include, url
  
  from django.contrib import admin
  admin.autodiscover()
  
  urlpatterns = patterns('',
      url(r'^polls/', include('polls.urls')),
      url(r'^admin/', include(admin.site.urls)),
  )
  </code></pre>
  
  <p>The error that I am getting is:</p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://127.0.0.1:8000/polls/34
  
  Django Version: 1.5.1
  Python Version: 2.7.3
  Installed Applications:
  ('django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.sites',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.admin',
   'polls')
  Installed Middleware:
  ('django.middleware.common.CommonMiddleware',
   'django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware')
  
  
  Traceback:
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    92.                     response = middleware_method(request)
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/middleware/common.py" in process_request
    69.             if (not urlresolvers.is_valid_path(request.path_info, urlconf) and
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in is_valid_path
    551.         resolve(path, urlconf)
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
    440.     return get_resolver(urlconf).resolve(path)
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
    319.             for pattern in self.url_patterns:
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
    347.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
    342.             self._urlconf_module = import_module(self.urlconf_name)
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
    35.     __import__(name)
  File "/home/matthew/djangopoll/mysite/mysite/urls.py" in &lt;module&gt;
    8.                        url(r'^polls/', include('polls.urls')),
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/conf/urls/__init__.py" in include
    25.         urlconf_module = import_module(urlconf_module)
  File "/home/matthew/.virtualenvs/djangopoll/local/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
    35.     __import__(name)
  
  Exception Type: SyntaxError at /polls/34
  Exception Value: invalid syntax (urls.py, line 9)
  </code></pre>
  
  <p>Also, the following may be informative:</p>
  
  <ul>
  <li>Using Django 1.5</li>
  <li>Using Python 2.7.3</li>
  <li>Using Django 1.5 documentation</li>
  <li>Using VirtualBox</li>
  <li>Using VirtualEnv</li>
  </ul>
  
  <p>Any help is appreciated!  Why am I getting this error?</p>