title: Django reverse error
body: <p>Iam working on this project for listing patient details and updating them
  getting error Reverse for 'update_patient' not found. 'update_patient' is not a valid view function or pattern name. help to fix the error</p>
  
  <p>patient.html</p>
  
  <pre><code>  {% extends 'patient/base.html' %} {% block content %}
   &lt;p&gt;Patient: {{ patient }}&lt;/p&gt;
    &lt;p&gt;Entries: &lt;/p&gt;
    &lt;p&gt;Update Patient:&lt;/p&gt;
    &lt;p&gt;
     &lt;a href="{% url 'patient:new_entry' patient.id %}"&gt;add new entry&lt;/a&gt;
    &lt;/p&gt;
     &lt;ul&gt;
  {% for entry in entries %}
  &lt;li&gt;
      &lt;p&gt;{{ entry.date_added|date:'M d, Y H:i' }}&lt;/p&gt;
      &lt;p&gt;{{ entry.text|linebreaks }}&lt;/p&gt;
      &lt;p&gt;
          &lt;a href="{% url 'patient:edit_entry' entry.id %}"&gt;edit 
     entry&lt;/a&gt;
      &lt;/p&gt;
     &lt;/li&gt;
     {% empty %}
     &lt;li&gt;
          There are no entries for this topic yet.
      &lt;/li&gt;
      {% endfor %}
    &lt;/ul&gt;
  
    &lt;a href="{% url 'patient:update' patient.id %}"&gt;update&lt;/a&gt;
  
     &lt;a href="{% url 'patient:new_patient' %}"&gt;Add a new patient:&lt;/a&gt; {% 
    endblock content %}
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>    def update_patient(request, patient_id):
  patient = Patient.object.get(id=patient_id)
  if request.method != 'POST':
      # Initial request; pre-fill form with the current entry.
      form = PatientForm(instance=patient)
  else:
      # POST data submitted; process data.
      form = PatientForm(instance=patient, data=request.POST)
      if form.is_valid():
          form.save()
          return HttpResponseRedirect(reverse('patient:patients',
                                      args=[patient.id]))
  context = {'patient': patient, 'form': form}
  return render(request, 'patient/update_patient.html', context)
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>        url(r'^update_patient/(?P&lt;patient_id&gt;\d+)/$', views.update_patient, name='update'),
  </code></pre>
  
  <p>update_patient.html</p>
  
  <pre><code>      {% extends "patient/base.html" %} {% block content %}
    &lt;p&gt;&lt;a href="{% url 'patient:patient' patient.id %}"&gt;{{ patient }}&lt;/a&gt;
       &lt;/p&gt;
     &lt;p&gt;Update:&lt;/p&gt;
  
       &lt;form action="{% url 'patient:update_patient' patient.id %}" 
          method='post'&gt;
        {% csrf_token %} {{ form.as_p }}
        &lt;button name='submit'&gt;update&lt;/button&gt;
     &lt;/form&gt;
       {% endblock content %}
  </code></pre>