title: Django Queryset of related objects, after prefiltering on original model
body: <p>Given a queryset for one model, I want to get a queryset of another model that is related by foreign key. Take the Django project docs' weblog schema:</p>
  
  <pre><code>class Blog(models.Model):
      name = models.CharField(max_length=100)
      tagline = models.TextField()
  
      def __unicode__(self):
          return self.name
  
  class Author(models.Model):
      name = models.CharField(max_length=50)
      email = models.EmailField()
  
      def __unicode__(self):
          return self.name
  
  class Entry(models.Model):
      blog = models.ForeignKey(Blog)
      headline = models.CharField(max_length=255)
      body_text = models.TextField()
      pub_date = models.DateField()
      mod_date = models.DateField()
      authors = models.ManyToManyField(Author)
      n_comments = models.IntegerField()
      n_pingbacks = models.IntegerField()
      rating = models.IntegerField()
  
      def __unicode__(self):
          return self.headline
  </code></pre>
  
  <p>Suppose I have an <code>author</code> object, and I want to get every blog that author has written for, as a queryset.  I do something like <code>author_blogs = [entry.blog for entry in author.entry_set]</code>.  But I'm left with a list in this case, not a queryset.  Is there a way I can do this directly with ORM queries, so I can set it up via a custom Entry manager with <code>use_for_related_fields = True</code> and do something like <code>author_blogs = author.entry_set.blogs</code>, and get the benefits of delayed evaluation, etc., of a queryset?</p>
  
  <p><strong>Edited scenario and solution</strong></p>
  
  <p>So, I realized after the fact that the application of my question is slightly different than how I posed it above, for which Daniel Roseman's situation makes a lot of sense.  My situation is really more like <code>author.entry_set.manager_method().blogs</code>, where <code>manager_method()</code> returns a queryset of Entry objects.  I accepted his answer because it inspired the solution I found which is to do:</p>
  
  <pre><code>author_blogs = Blog.objects.filter(entry__in=author.entry_set.manager_method())
  </code></pre>
  
  <p>The nice thing is that it only uses one DB query.  It's a bit tricky and verbose, so I think it's best to define <code>blogs()</code> as an object method of Author, returning the above.</p>