On Wednesday, December 9, 2015 at 1:02:13 AM UTC-6, Anssi Kääriäinen wrote: > > This one actually does work with filter(). As the count is inside a > subselect, it can be used directly in the WHERE clause without GROUP BY or > HAVING. Using a direct count without a subselect wouldn't work. >
Ha, actually, it works since django 1.8.6: "Allowed filtering over a RawSQL annotation (#25506 <https://code.djangoproject.com/ticket/25506>)." (https://docs.djangoproject.com/en/1.8/releases/1.8.6/#bugfixes) I was using a previous version django, that is why it was not working for me. Thanks. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d68ad9f2-b13f-4417-874b-a60b93afc3a6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
