title: NoReverseMatch problem with UpdateView class in Django
body: <p>I am trying to create an update view in django, inheriting UpdateView.
  My view looks like this:</p>
  <pre><code>class UpdateStudentView(UpdateView):
      model = Student
      form_class = StudentForm
      template_name = &quot;students/students_update.html&quot;
      success_url = reverse_lazy(&quot;students:students&quot;)
  </code></pre>
  <p>This view takes Student`s primary key as an argument from url</p>
  <pre><code>    path(&quot;update/&lt;uuid:pk&gt;/&quot;, UpdateStudentView.as_view(), name=&quot;update_student&quot;),
  </code></pre>
  <p>And here is the template, which should take this primary_key from url and pass it to view.</p>
  <pre><code>{% block content %}
          &lt;form action=&quot;{% url &quot;students:update_student&quot; pk %}&quot; method=&quot;post&quot;&gt; {% csrf_token %}
              {{ form.as_p }}
              &lt;button type=&quot;submit&quot;&gt;Submit&lt;/button&gt;
          &lt;/form&gt;
  {% endblock content %}
  </code></pre>
  <p>However, it doesn`t work and throws a NoReverseMatch:</p>
  <pre><code>NoReverseMatch at /students/update/primary_key_here/
  Reverse for 'update_student' with arguments '('',)' not found. 1 pattern(s) tried: ['students/update/(?P&lt;pk&gt;[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/\\Z']
  </code></pre>
  <p>Could you please explain me why does this happen and how can I avoid this error?</p>
  <p>Please don`t tell me about using pk_url_kwarg = 'pk', as it is 'pk' by default</p>
  <p>Thanks in advance!</p>