Not working query_set.query.group_by = [..] in v1.8

15 views
Skip to first unread message

Михаил Митрофанов

unread,
Sep 24, 2015, 9:47:39 AM9/24/15
to Django users
I am upgrade from Django v 1.6 to v1.8. I use this code:

query_set = Rubrica.objects.filter(...).annotate(count=Count('..')).order_by('user', '-pub_date')
query_set.query.group_by = ['user_id']

On Django version 1.6 this is works fine, but on version 1.8 results is not grouped by user_id field.
How can I solve this problem?
Reply all
Reply to author
Forward
0 new messages