title: Django - Get data from another model in Detailview
body: <p>I'm trying to get objects from two models using DetailView.
  First I set urls.py:</p>
  
  <pre><code>url(r'^page/(?P&lt;slug&gt;[-\w]+)/$', PageDetailView.as_view(), name='page-detail'),
  </code></pre>
  
  <p>I've created a model:</p>
  
  <pre><code>class PageContainer(models.Model):
      site = models.ForeignKey(Site, on_delete=models.CASCADE)
      name = models.CharField(max_length=200)
      slug = models.CharField(max_length=200)
  
      def __str__(self):
          return self.name
  
  
  class Pages(models.Model):
      pageContainer = models.ForeignKey(PageContainer, on_delete=models.CASCADE)
      uniq = models.CharField(max_length=200)
      name = models.CharField(max_length=200)
      slug = models.CharField(max_length=200)
      body = models.TextField()
      site = models.ForeignKey(Site, on_delete=models.CASCADE)
  
      class Meta:
          verbose_name = "Page"
          verbose_name_plural = "Pages"
  
      def __str__(self):
          return self.name
  
      def was_published_recently(self):
          return self.date &gt;= timezone.now() - datetime.timedelta(days=1)
  </code></pre>
  
  <p>and the DetailView:</p>
  
  <pre><code>class PageDetailView(DetailView):
      model = Pages
  
      def get_queryset(self):
          return super(PageDetailView, self).get_queryset().filter(site_id=4)
  </code></pre>
  
  <blockquote>
    <p>I've set  .filter(site_id=4) because there are some pages with some
    slug (home) and I want to retrieve the page only for selected site
    (site_id=4 in my db).</p>
  </blockquote>
  
  <p>Now, in my template, I can use:</p>
  
  <pre><code>{{ object.name }}
  </code></pre>
  
  <p>to retrieve the page name but, I need to get some info of another table, in this view.
  How can I do it?
  Thanks!</p>