title: NoReverseMatch in Django tutorial chapter 4
body: <p>I have following error in my Django demo project</p>
  
  <pre><code>NoReverseMatch at /polls/4/vote/
  Reverse for 'results' with arguments '(4,)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  Request Method: POST
  Request URL:    http://127.0.0.1:8000/polls/4/vote/
  Django Version: 1.8
  Exception Type: NoReverseMatch
  Exception Value:    
  Reverse for 'results' with arguments '(4,)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
  Exception Location: C:\Python34\lib\site-packages\django-1.8-py3.4.egg\django\core\urlresolvers.py in _reverse_with_prefix, line 496
  Python Executable:  C:\Python34\python.exe
  Python Version: 3.4.3
  Python Path:    
  ['D:\\DjangoDemo\\demo',
   'C:\\Python34\\lib\\site-packages\\django-1.8-py3.4.egg',
   'C:\\Python34\\lib\\site-packages\\setuptools-15.0-py3.4.egg',
   'C:\\windows\\system32\\python34.zip',
   'C:\\Python34\\DLLs',
   'C:\\Python34\\lib',
   'C:\\Python34',
   'C:\\Python34\\lib\\site-packages']
  Server time:    Wed, 15 Apr 2015 17:04:09 +0530
  </code></pre>
  
  <p>My View:- </p>
  
  <pre><code>from django.utils import timezone
  from django.shortcuts import render
  from django.http import Http404
  from django.shortcuts import get_object_or_404, render
  from django.http import HttpResponseRedirect, HttpResponse
  from django.core.urlresolvers import reverse
  from django.template import RequestContext,loader
  from .models import Question,Choice
  
  def index(request):
  
      #get latest 5 Question object from DB
      latest_question_list = Question.objects.order_by('-pub_date')[:5]
  
      # iterate over question object list and print question_text 
      #output = ', '.join([p.question_text for p in latest_question_list])
      #Use Django Template loader and load index.html template
      template = loader.get_template('polls/index.html')
      #context is same as requestDispatcher it take request and Dict and send to loaded Template bcoz target template hold this key value.
      context = RequestContext(request,{
      'latest_question_list':latest_question_list,
      })
  
      #SortCut
      #context = {'latest_question_list': latest_question_list}
      #return render(request, 'polls/index.html', context)
  
      return HttpResponse(template.render(context))
  
  
  def detail(request,question_id):
  
      try:
          question = Question.objects.get(pk=question_id)
      except Question.DoesNotExist:
          raise Http404("Question does not exist")
      return render(request,'polls/detail.html',{'question':question})
  
  def results(request,question_id):
      question = get_object_or_404(Question,pk=question_id)
      return render(request,'polls/results.html',{'question':question})
  
  def vote(request,question_id):
  
      p = get_object_or_404(Question,pk=question_id)
      try:
          selected_choice = p.choice_set.get(pk=request.POST['choice'])
      except (KeyError,Choice.DoesNotExist):
          return render(request, 'polls/detail.html',{
  
          'question':p,
          'error_message':"You didn't select a choice",
          })
      else:
          selected_choice.votes +=1
          selected_choice.save()
          return HttpResponseRedirect(reverse('polls:results',args=(p.id,)))
  </code></pre>
  
  <p>Detail page:-</p>
  
  <pre><code>&lt;h1&gt;{{ question.question_text }}&lt;/h1&gt;
  
  {% if error_message %}&lt;p&gt;&lt;strong&gt;{{ error_message }}&lt;/strong&gt;&lt;/p&gt;{% endif %}
  
  &lt;form action="{% url 'polls:vote' question.id %}" method="post"&gt;
  {% csrf_token %}
  {% for choice in question.choice_set.all %}
      &lt;input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" /&gt;
      &lt;label for="choice{{ forloop.counter }}"&gt;{{ choice.choice_text }}&lt;/label&gt;&lt;br /&gt;
  {% endfor %}
  &lt;input type="submit" value="Vote" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>polls/urls.py:</p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  
  urlpatterns = [
  
      url(r'^$', views.index,name='index'),
      url(r'^(?P&lt;question_id&gt;[0-9]+)/$', views.detail,name='detail'),
      url(r'^(?P&lt;question_id&gt;[0-9]+)/results/$', views.results,name='result'),
      url(r'^(?P&lt;question_id&gt;[0-9]+)/vote/$', views.vote,name='vote'),
  ]
  </code></pre>