Re: How to query multiple described objects exist in a many to many field

2013-12-05 Thread Aamu Padi
Thank you so much! That was a very helpful explanation. And it worked perfectly!!! Just, one more question please. Suppose, the user wants to send a message to a group of users, how do I find the thread in this situation? Eg: user1 wants to send a message to both the user2 and user3. How to find

Re: How to query multiple described objects exist in a many to many field

2013-12-04 Thread Tom Evans
On Wed, Dec 4, 2013 at 10:24 AM, Aamu Padi wrote: > How do I check whether there is a thread containing only the sender (user 1) > and the recipient (user 2), and no other users. > > models.py > > class Thread(models.Model): > user = models.ManyToManyField(User) > is_hidden = m