title: Django - Object Set Minus Existence in Another Set
body: <p>I'm trying to get a set of objects in Django Minus its existence in another set of objects.  I have a Message model with a thread field that designates which thread it belongs to and a MessagesRead model that stores the user and the message that he/she has seen.  I'm trying to return the messages that he/she has NOT read (to alerts for new messages), i.e. those messages that are not stored as a pair in the MessagesRead table.</p>
  
  <p>Something like the following:</p>
  
  <pre><code>def unread_messages(user, thread_id):
      Message.objects.filter(
          self not in MessagesRead.objects.filter(
              message__thread_id=thread_id,
              user=user,
          )
      )
  </code></pre>
  
  <p>Can I do the above somehow or is there another way?</p>