title: Django DetailView Filter by Foreign Key
body: <p>I am little puzzled and would like to utilized the DetailView functionality using the foreign key as my filter to display the data. Basically my model looks like this:</p>
  
  <pre><code>class Category(models.Model):
      name = models.CharField(max_length=30)
      slug = models.SlugField(help_text="A short name for Category")
  
      def __unicode__(self):
         return self.name
  
      class Meta:
         ordering = ["-name"]
         verbose_name_plural = "categories"  
  
  
  class Publisher(models.Model):
      name = models.CharField(max_length=30)
      slug = models.SlugField(help_text="A short name for Publisher")
  
      class Meta:
         ordering = ["-name"]
  
      def __unicode__(self):
          return self.name
  
  
  class Book(models.Model):
      title = models.CharField(max_length=100)
      slug = models.SlugField(help_text="A short name for book")
      pub_date = models.DateField()
      publisher = models.ForeignKey(Publisher)
      category = models.ForeignKey(Category)
  
      class Meta:
         ordering = ["-title"]
  
      def __unicode__(self):
         return self.title
  </code></pre>
  
  <p>My Urls.py:</p>
  
  <pre><code>url(r'^categories/(?P&lt;slug&gt;[\w-]+)/$', DetailView.as_view(model=Category,template_name="books/category_detail" )),
  </code></pre>
  
  <p>My Category_detail.html</p>
  
  <pre><code>{% block content %}
      &lt;h2&gt;{{ category.name}} &lt;/h2&gt;
      &lt;ul&gt;       
      &lt;li&gt;Book Title: {{ book.title }}&lt;/li&gt;
  &lt;li&gt;Book publisher: {{ book.publisher }}&lt;/li&gt;
      &lt;li&gt;Book Published Date: {{ book.pub_date }}&lt;/li&gt;    
      &lt;/ul&gt;
  {% endblock %}
  </code></pre>
  
  <p>Basically I would like to display in my category_detail.html the following information:
           <li>Category Name</li>
           <li>Book Title</li>
           <li>Publisher Name</li>
           <li>Published Date</li></p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thank you - Keoko</p>