title: Query selector sort
body: <pre><code>Inbox = Messages.objects.filter(Q(sender=request.user) | Q(receiver=request.user))
  context['Inbox'] = Inbox
  </code></pre>
  <p>Currently I am using this to grab all messages for the currently logged in user.</p>
  <p>I want to sort it by time and read status. So that the lastest unread message shows up first.</p>
  <p>models.py</p>
  <pre><code>class Messages(models.Model):
      sender = models.ForeignKey(Profile,related_name='sender',on_delete=models.CASCADE)
      receiver = models.ForeignKey(Profile,related_name='receiver',on_delete=models.CASCADE)
      subject = models.CharField(default='',max_length=100)
      text = models.CharField(default='',max_length=4096)
      time = models.DateTimeField(auto_now_add=True)
      read = models.BooleanField(default=False)
  
      def __str__(self):
          return '{} to {} :{}'.format(self.sender,self.receiver,self.text)
  </code></pre>