title: Django - how to delete an object using a view
body: <p>I have the class People</p>
  
  <pre><code>class People (models.Model):
      first_name = models.CharField(max_length = 50)
      last_name = models.CharField(max_length = 50)
      email = models.EmailField(blank = True)
      grade = models.CharField(max_length = 2)
  
      def __unicode__(self):
          return '%s %s' % (self.first_name, self.last_name)
  </code></pre>
  
  <p>I have the delete view</p>
  
  <pre><code>def delete(request):
      query = People.objects.get(pk=id)
      query.delete()
      return HttpResponse("Deleted!")
  </code></pre>
  
  <p>And I have the html template code </p>
  
  <pre><code>{% for person in people_list %}
  &lt;TR ALIGN="CENTER"&gt;
          &lt;td&gt;{{ person.first_name }}&lt;/td&gt;
      &lt;td&gt;{{ person.last_name }}&lt;/td&gt;
      &lt;td&gt;{{ person.email }}&lt;/td&gt;
      &lt;td&gt;{{ person.grade }}&lt;/td&gt;
      &lt;td&gt;&lt;form action="/modify.html"&gt;
          &lt;input type="submit" value="Modify"&gt;
          &lt;/form&gt;&lt;/td&gt;
      &lt;td&gt;&lt;form action="/delete.html"&gt;
          &lt;input type="submit" value="Delete"&gt;
          &lt;/form&gt;&lt;/td&gt;
  &lt;/TR&gt;
        {% endfor %}
  </code></pre>
  
  <p>How can I get the person.id from the template and put it in the delete view and delete the object corresponding with the person.id I want.</p>