title: Django efficient Queryset with Foreign Key Models
body: <p>I'm trying to find the most efficient way (as less db queries as possible) for the following model structure.</p>
  
  <p>In my template I then want to pass all the data from all 3 models because I would have to show the post data as well as looping through the comments to create a comments list and display all the attachments for the different comments.</p>
  
  <pre><code>class Post(BaseModel):
      user = models.ForeignKey('User', blank=True, null=True, 
      title = models.CharField(max_length=128)
      content = models.TextField()
  
  
  class Comment(BaseModel):
      post = models.ForeignKey('Post', on_delete=models.CASCADE)
      user = models.ForeignKey('User', on_delete=models.SET_NULL)
      text = models.TextField()
  
  
  class CommentAttachment(BaseModel):
      comment = models.ForeignKey('Comment', on_delete=models.CASCADE)
      name = models.CharField(max_length=128)
  </code></pre>
  
  <p>Should I fetch all data from <code>CommentAttachment</code> direction (meaning fetching all <code>CommentAttachments</code> where <code>comment__post__id</code> is the post id and then get all other data with <code>select_related</code>) or is there another way to start from the <code>Post</code> Model?</p>