title: How to include results from related model into queryset?
body: <p>I'd like to show the <code>likers</code> of each <code>post</code> below that post while the posts are rendered in a for loop. Here are the models:</p>
  
  <pre><code>class Post(models.Model):
      title = models.CharField(max_length=75, null=True, blank=True)
      created = models.DateTimeField(auto_now_add=True)
      creator = models.ForeignKey(User, null=True)
      topic = models.ForeignKey(Topic)
      body = models.TextField(max_length=10000)
      published = models.BooleanField(default=True)
  
  
  class PostLike(models.Model):
      post = models.IntegerField(default=0) #post.id
      liker = models.IntegerField(default=0) #user.id of the post liker
  </code></pre>
  
  <p>Then the posts with their likes should be rendered like this:</p>
  
  <pre><code>          {% for post in posts %}
            &lt;div class="row"&gt;
  
             &lt;div&gt;{{ post.created |timesince }}&lt;/div&gt;
             &lt;div&gt;{{ post.creator }}&lt;/div&gt;
             &lt;div&gt;{{ post.title }}&lt;/div&gt;
             &lt;div&gt;{{ post.body }}&lt;/div&gt; 
             &lt;ul&gt;
                {% for liker in post.likers %}
                     &lt;li&gt;&lt;a href="/path/to/profile/{{ liker.name}}"&gt;{{ liker.name}}&lt;/a&gt;&lt;/li&gt; 
                {% endfor %}
             &lt;/ul&gt;
  
             {% endfor %}        
  </code></pre>
  
  <p>Currently (before deploying likes)  I query posts like this in <code>views.py</code>:</p>
  
  <pre><code>posts = Post.objects.filter(topic=topic_id).order_by("created") 
  </code></pre>
  
  <p>I'm wondering what is the best way to put likers in posts query so that they can be used in the template as above? </p>