title: Django - queryset for multiple models that related with foreignkey
body: <p>I have models.py like this:</p>
  
  <pre><code>class Post(models.Model):
      name = models.CharField(max_length=100,blank=True)
      author = models.ForeignKey(User, null=True, blank=True)
      ...
  
  class Categories(models.Model):
     category = models.CharField(max_length=200)
     post_id = models.ForeignKey(Post)
  
  class Tags(models.Model):
    tag = = models.CharField(max_length=200)
    tag_id = models.ForeignKey(Post)  
  </code></pre>
  
  <p>How do I get the all the related objects if given the author id. 
  eg. In the view.py</p>
  
  <pre><code>def AllPost(request, userid):
      posts = Post.objects.filter(author=userid)
      for post in Posts:
           category = Categories.filter(post_id = post.id)
           tag = Tags.filter(post_id = post.id)
  </code></pre>
  
  <p>The problem of the function above will causes extra query for each of the post. Is there any way to call all the objects in single query??</p>