title: How to make delete button in Django
body: <p>Help me please to understand how to make the delete button, its must to delete a <code>Cat</code></p>
  
  <pre><code>class Cat(models.Model):
      class Meta():
          db_table = "cat"
  
      paw = models.IntegerField(default=4)
      name = models.CharField(max_length=30, null=False, default='Cat')
      age = models.IntegerField(default=False, null=False)
      species = models.CharField(max_length=50, blank=True)
      hairiness = models.IntegerField(default=False, null=False)
  
      def __str__(self):
          return self.name
  </code></pre>
  
  <p>This is my <code>views.py</code>, hope you can help. (it's need for my job interview on Monday)</p>
  
  <pre><code>from django.shortcuts import render, get_object_or_404
  from .models import Cat
  from .forms import CatForm
  from django.shortcuts import redirect
  
  def home(request):
      template = "base.html"
      queryset = Cat.objects.all()
      context = {
          "object_list": queryset
      }
      return render(request, template, context)
  
  def new_cat(request):
      if request.method == "POST":
          form = CatForm(request.POST)
          if form.is_valid():
              cat = form.save(commit=False)
              cat.save()
              return redirect('/', pk=cat.pk)
      else:
          form = CatForm()
      return render(request, 'new_cat.html', {'form': form})
  
  def cat_edit(request, pk):
      cat = get_object_or_404(Cat, pk=pk)
      if request.method == "POST":
          form = CatForm(request.POST, instance=cat)
          if form.is_valid():
              cat = form.save(commit=False)
              cat.save()
              return redirect('/', pk=cat.pk)
      else:
          form = CatForm(instance=cat)
      return render(request, 'new_cat.html', {'form': form})
  </code></pre>
  
  <p>site is asc to addd more details, but i just don't know what else, i can add.</p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  
  
  urlpatterns = [
      url(r'^$', views.home, name='home'),
      url(r'^new/$', views.new_cat, name='new_cat'),
      url(r'^edit/(?P&lt;pk&gt;[0-9]+)/$', views.cat_edit, name='cat_edit'),
  ]
  </code></pre>