title: How to create a confirmation popup for class.DeleteView
body: <p>I am looking to create a confirmation popup window whenever the delete button is clicked. It currently is functional and immediately deletes. Here is some of my code:
  views.py:</p>
  
  <pre><code>class patientDelete(LoginRequiredMixin, DeleteView):
      model = patient
      success_url = reverse_lazy('patients:index')
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;form action="{% url 'patients:patient-delete' patient.id %}" method="post" style="display: inline;"&gt;
      {% csrf_token %}
      &lt;input type="hidden" name="patient_id" value="{{ patient.id }}" /&gt;
      &lt;button type="submit" class="btn btn-default btn-sm"&gt;
          &lt;span class="glyphicon glyphicon-trash"&gt;&lt;/span&gt;
      &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and my urls.py</p>
  
  <pre><code># /patients/patient/pk/delete
  url(r'patient/(?P&lt;pk&gt;[0-9]+)/delete/$', views.patientDelete.as_view(), name='patient-delete'),
  </code></pre>
  
  <p>I have searched left, right and center and dont really understand most of it. I have been using a lot of tutorials to help me here and am quite new to django. Thanks for your help in advance!</p>