title: Reverse for 'customerdel' with arguments '('',)' not found.1 pattern(s) tried: ['dashboard/records/customerdel/(?P<pk>[0-9]+)$']
body: <p>I am trying to delete an object from database using simple html button. Also, trying to implement &quot;are you sure&quot; message? BUt I am getting this error everytime and I am not able to crack.</p>
  <p>This is my view function.</p>
  <pre><code>    def customerdel(request,pk):
          objs = Customer.objects.filter(id=pk)
          if request.method == 'POST':
              objs.delete()
              # messages.success(request, 'Successfully deleted')
              return render(request,'records.html')
  
          else:
              content ={
               'items':Customer.objects.all
              }
              return render(request,'delete.html', content)
  </code></pre>
  <p>This is record.html page</p>
  <pre><code>&lt;h1&gt;Record's page&lt;/h1&gt;
  
  {% for abc in Customerdata %}
  {{abc.name}}
  {{abc.pk}}
  
  
  &lt;form &gt;
      &lt;button  class=&quot;btn btn-danger btn-sm&quot;&gt;
      &lt;a href=&quot;{% url 'customerdel' abc.pk %}&quot;&gt;Delete&lt;/a&gt;&lt;/button&gt;
  &lt;/form&gt;
  {% endfor %}
  </code></pre>
  <p>This is delete.html page</p>
  <pre><code>&lt;h1&gt;Welcome to Delete page&lt;/h1&gt;
  
  
  &lt;p&gt;Are you sure want to del {{items.name}} ??&lt;/p&gt;
  &lt;form action=&quot;{% url 'customerdel' items.pk %}&quot; method=&quot;post&quot;&gt;
      {% csrf_token %}
      &lt;a href=&quot;{% url 'records' %}&quot;&gt;Cancel&lt;/a&gt;
      &lt;input name=&quot;confirm&quot; type=&quot;submit&quot; &gt;
  
  &lt;/form&gt;
  </code></pre>
  <p>This is my URL.</p>
  <pre><code>path('dashboard/records/customerdel/&lt;int:pk&gt;', views.customerdel, name='customerdel'),
  </code></pre>