On Sun, May 22, 2011 at 05:42:00PM -0700, Chris Beaven wrote: > Isn't the first suggestion (__contains) achievable already by just chaining > two filters: Group.objects.filter(persons=p1).filter(persons=p2) ?
Sure, but if I want to filter on several different numbers of persons, it gets very messy very quickly. The second suggestion could also be implemented using a count, but again that's rather unpleasant in all but the simplest use cases. Dan -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.