Thursday, September 24, 2015

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

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?

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment