On 12/17/2010 08:38 PM, Łukasz Rekucki wrote:
Blog.objects.filter(post_tags__name__in=["foo",
"bar"]).annotate(match_count=Count('post__tags')).filter(match_count=2)
This should give you the right results.
Neat! And blazingly fast, too, I guess!
Thank you very much, anyway :-)
Jonas
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.