title: Django: Filtering Distinct Data
body: <p>I'm trying to build a messaging app. Here's my model,</p>
  
  <pre><code>class Message(models.Model):
  sender = models.ForeignKey(User, related_name="sender")
  receiver = models.ForeignKey(User, related_name="receiver")
  msg_content = models.TextField()
  created_at = models.DateTimeField(auto_now_add=True)
  </code></pre>
  
  <p>This is what I tried in view,</p>
  
  <pre><code>data = Message.objects.filter(Q(sender=request.user) | Q(receiver=request.user)).order_by('-created_at')
  </code></pre>
  
  <p>In my template,</p>
  
  <pre><code>{% for abc in data %}
      {{ abc.receiver }}&lt;br /&gt;
  {% endfor %}
  </code></pre>
  
  <p>How can I print out the distinct users?</p>