title: Delete Object in Template using DeleteView without Confirmation
body: <p>I'm trying to write a <code>DeleteView</code> for deleting posts without getting displayed a confirmation page.</p>
  
  <p><a href="https://i.stack.imgur.com/049gW.png" rel="nofollow noreferrer">Del - delete button</a>. How can I delete the object immediately?</p>
  
  <p><code>urls.py</code>:</p>
  
  <pre><code>urlpatterns = [
      # url(r'^$', views.index, name='index'),
      url(
          r'^feed$',
          views.FeedView.as_view(),
          name='feed'
      ),
      url(r'^summary(?P&lt;pk&gt;\w{0,50})',
          views.SummaryCreate.as_view(),
          name='summary'),
      url(r'^summary(?P&lt;user_id&gt;\w{0,50})/(?P&lt;pk&gt;\w{0,50})/',
          views.SummaryDelete.as_view(),
          name='delete_summary'),
      url(r'^dashboard$',
          permission_required('reed.view_dashboard')
          (views.DashboardListView.as_view()),
          name='dashboard'),
      url(r'^dashboard/(?P&lt;pk&gt;\w{0,50})',
          permission_required('reed.view_dashboard')
          (views.DashboardUpdate.as_view()),
          name='review_summary'),
  ]
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>class SummaryCreate(LoginRequiredMixin, generic.CreateView):
  template_name = 'template/summary_list.html'
  model = Summary
  form_class = AddUrlForm
  login_url = '/login_page/login/'
  redirect_field_name = 'login_page'
  
  def get_context_data(self, **kwargs):
      return dict(
          super(SummaryCreate, self).get_context_data(**kwargs),
          summary_list=reversed(Summary.objects.filter(user_id=self.kwargs['pk']).reverse())
      )
  
  def get_success_url(self):
      return reverse('summary', args=(self.request.user.id.hex,))
  
  def form_valid(self, form):
      print(self.request.user.id.hex)
  
      url_inst = form.save(commit=False)
      keywords_inst = Keywords
  
      article = Article(form.cleaned_data['url'], language='en')
      article.download()
      article.parse()
  
      title = article.title
      print(title)
  
      try:
          image = article.top_image
          print(image)
      except Exception:
          image = ''
  
      article.nlp()
  
      try:
          keywords = article.keywords
          print(keywords)
      except Exception:
          keywords = 'Sorry,no,keywords,found'
  
      try:
          summary = article.summary
          print(summary)
      except Exception:
          summary = 'Sorry, no summmary found'
  
      try:
          publish_date = article.publish_date
          publish_date = publish_date.date()
          print(publish_date)
      except Exception:
          publish_date = '1900-01-01'
  
      user = User.objects.get(id=self.request.user.id.hex)
      url_inst.url=form.cleaned_data['url']
      url_inst.image=image
      url_inst.title=title
      url_inst.summary=summary
      url_inst.date=publish_date
      url_inst.user_id=user
      url_inst.save()
      summary = Summary.objects.get(url=form.cleaned_data['url'])
      #
      for keyword in keywords:
          new_keyword = keywords_inst(keyword=keyword, keyword_id=summary)
          new_keyword.save()
      #
      return super(SummaryCreate, self).form_valid(form)
  
  
  class SummaryDelete(SummaryCreate, generic.DeleteView):
      model = Summary
      pk_url_kwarg = 'pk'
      slug_url_kwarg = 'pk'
  
      def get_success_url(self):
          return reverse('summary', args=(self.request.user.id.hex,))
  
      def dispatch(self, request, *args, **kwargs):
          return super(SummaryDelete, self).dispatch(request, *args, **kwargs)
  </code></pre>
  
  <p><strong>template.html</strong>:</p>
  
  <pre><code> &lt;form action="{% url 'delete_summary' user.id.hex summary.id.hex %}" method="post"&gt;{% csrf_token %}
        &lt;h3&gt;
          &lt;input type="submit" class="delete" aria-hidden="true" value="X"&gt;
          {{summary.title}}
        &lt;/h3&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>I have 2 classes in one template: 1 for displaying all posts and adding new posts and second for deleting, but deleting only redirect me on page, that I provide for DeleteView.</p>