title: Reverse for 'patient_update' with keyword arguments '{'pk': ''}' not found. 1 pattern(s) tried: ['patients/update/(?P<pk>[0-9]+)$']?
body: <p>I made a view where users can edit the patients information and as I'm using a custom user model I had to make a custom update/delete view.The views are working when i enter them manually by the url but when i put a link reference to them by an anchor tag i get an error that it can't access the pk,I tried following many answers here and vids on YT but the error is still there</p>
  
  <p>Views.py</p>
  
  <pre><code>def PatientUpdateView(request,pk=None):
  
      patient = get_object_or_404(models.Patient, pk=pk)
      form = forms.PatientForm(request.POST or None ,instance=patient)
      if form.is_valid() :
          patient = form.save(commit=False)
          patient.save()
          messages.success(request,"patient updated!")
          context = {
              'patient': patient,
              'form': form
          }
          return render(request,'patients/patient_edit_form_success.html',context)
      else:
          context = {
              'patient' : patient,
              'form': form,
                     }
          return render(request, 'patients/patient_edit_form.html', context)
  </code></pre>
  
  <p>and here's how i call it in an anchor tag </p>
  
  <pre><code> &lt;a class="btn btn-info btn-sm" href="{% url 'patients:patient_update' patient.pk %}"&gt;Open&lt;/a&gt;
  </code></pre>
  
  <p>I tried </p>
  
  <pre><code>pk = patient.pk
  pk = pk 
  </code></pre>
  
  <p>and many other ways of calling it.</p>
  
  <p>urls.py 
   here's the url pattern that i use</p>
  
  <pre><code>    path('update/&lt;int:pk&gt;', views.PatientUpdateView, name='patient_update'),
  </code></pre>