title: Django 'polls' is not a registered namespace
body: <p>I'm learning Django from [THIS][1] tutorial. Everything worked perfectly until this step:</p>
  
  <p><em>Now change your polls/index.html template from:</em></p>
  
  <pre><code>&lt;li&gt;&lt;a href="{% url 'detail' poll.id %}"&gt;{{ poll.question }}&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p><em>to point at the namespaced detail view:</em></p>
  
  <pre><code>&lt;li&gt;&lt;a href="{% url 'polls:detail' poll.id %}"&gt;{{ poll.question }}&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>You can see the whole paragraph [HERE][2].</p>
  
  <p>And that's what happened after I changed 'detail' into 'polls:detail':</p>
  
  <pre><code>NoReverseMatch at /polls/
  'polls' is not a registered namespace
  Request Method: GET
  Request URL:    http://127.0.0.1:8000/polls/
  Django Version: 1.6.4
  Exception Type: NoReverseMatch
  Exception Value:    
  'polls' is not a registered namespace
  Exception Location: D:\Programy\Python 3.4\lib\site-packages\django\core\urlresolvers.py in reverse, line 528
  Python Executable:  D:\Programy\Python 3.4\python.exe
  Python Version: 3.4.0
  Python Path:    
  ['D:\\dziango\\strona1',
   'D:\\Programy\\Python 3.4\\python34.zip',
   'D:\\Programy\\Python 3.4\\DLLs',
   'D:\\Programy\\Python 3.4\\lib',
   'D:\\Programy\\Python 3.4',
   'D:\\Programy\\Python 3.4\\lib\\site-packages']
  Server time:    Wed, 21 May 2014 16:36:13 +0200
  </code></pre>
  
  <p>and here is my Traceback:</p>
  
  <pre><code>Environment:
  
  
  Request Method: GET
  Request URL: http://127.0.0.1:8000/polls/
  
  Django Version: 1.6.4
  Python Version: 3.4.0
  Installed Applications:
  ('django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'polls')
  Installed Middleware:
  ('django.contrib.sessions.middleware.SessionMiddleware',
   'django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware',
   'django.contrib.auth.middleware.AuthenticationMiddleware',
   'django.contrib.messages.middleware.MessageMiddleware',
   'django.middleware.clickjacking.XFrameOptionsMiddleware')
  
  
  Template error:
  In template D:\dziango\strona1\polls\templates\polls\index.html, error at line 1
     'polls' is not a registered namespace
     1 : {% if latest_poll_list %}
      &lt;ul&gt;
      {% for poll in latest_poll_list %}
          &lt;li&gt;&lt;a href=" {% url 'polls:detail' poll.id %} "&gt;{{ poll.question }}&lt;/a&gt;&lt;/li&gt;
      {% endfor %}
      &lt;/ul&gt;
  {% else %}
      &lt;p&gt;Nie ma ankiet.&lt;/p&gt;
  {% endif %}
  
  Traceback:
  File "D:\Programy\Python 3.4\lib\site-packages\django\core\handlers\base.py" in get_response
    114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "D:\dziango\strona1\polls\views.py" in index
    11.     return render(request, 'polls/index.html', context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\shortcuts\__init__.py" in render
    53.     return HttpResponse(loader.render_to_string(*args, **kwargs),
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\loader.py" in render_to_string
    169.         return t.render(context_instance)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\base.py" in render
    140.             return self._render(context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\base.py" in _render
    134.         return self.nodelist.render(context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\base.py" in render
    840.                 bit = self.render_node(node, context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\debug.py" in render_node
    78.             return node.render(context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\defaulttags.py" in render
    305.                 return nodelist.render(context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\base.py" in render
    840.                 bit = self.render_node(node, context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\debug.py" in render_node
    78.             return node.render(context)
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\defaulttags.py" in render
    196.                         nodelist.append(node.render(context))
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\defaulttags.py" in render
    447.                         six.reraise(*exc_info)
  File "D:\Programy\Python 3.4\lib\site-packages\django\utils\six.py" in reraise
    550.         raise value
  File "D:\Programy\Python 3.4\lib\site-packages\django\template\defaulttags.py" in render
    433.             url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app)
  File "D:\Programy\Python 3.4\lib\site-packages\django\core\urlresolvers.py" in reverse
    528.                                          key)
  
  Exception Type: NoReverseMatch at /polls/
  Exception Value: 'polls' is not a registered namespace
  </code></pre>
  
  <p>I tried every single solution from [THIS][3] similar topic but none of them works for me.
  I don't paste my code here because I wrote it all from that tutorial and it's exactly the same. Everything I did was done step by step according to it.
  But if you need my code anyway, please tell and I'll put it here.</p>
  
  <p>Sorry for my English.</p>
  
  <p>== EDIT ==
  here is my root urls.py file:</p>
  
  <pre><code>from django.conf.urls import patterns, url, include
  
  from django.contrib import admin
  admin.autodiscover()
  
  urlpatterns = patterns('',
      url(r'^polls/', include('polls.urls', namespace="polls")),
      url(r'^admin/', include(admin.site.urls)),
  )
  </code></pre>
  
  <p>and this is polls/views.py:</p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from django.http import HttpResponse, HttpResponseRedirect
  from django.core.urlresolvers import reverse
  
  from polls.models import Choice, Poll
  
  # Create your views here.
  def index(request):
      latest_poll_list = Poll.objects.order_by('-pub_date')[:5]
      context = {'latest_poll_list': latest_poll_list }
      return render(request, 'polls/index.html', context)
  
  def detail(request, poll_id):
      poll = get_object_or_404(Poll, pk=poll_id)
      return render(request, 'polls/detail.html', {'poll':poll})
  
  def results(request, poll_id):
      return HttpResponse("Wyniki ankiety %s!" %poll_id)
  
  def vote(request, poll_id):
      p = get_object_or_404(Poll, pk=poll_id)
      try:
          selected_choice = p.choice_set.get(pk=request.POST['choice'])
      except (KeyError, Choice.DoesNotExist):
          # Redisplay the poll voting form
          return render(request, 'polls/detail.html', {
              'poll':p,
              'error_message':"Nie wybrałeś żadnej opcji.",
              })
      else:
          selected_choice.votes += 1
          selected_choice.save()
      return HttpResponse(reverse('polls:results', args=(p.id,)))
  </code></pre>
  
  <p>polls/urls.py:</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>UPDATE:
  Okay, I've made a foolish mistake by placing my urls.py in the wrong directory.. sorry</p>