Hello

With a distinct query I understand the need to make the column that is 
required to be distinct the first column to order by.

eg:

    lm = Modification.objects.select_related().distinct('object_id').filter(
        content_type=topic_ct
        ).exclude(action=2).order_by('object_id', '-modified_on')

Having done the above, I need to reorder the resultset by modified_on and 
remove the object_id order. Is this possible? Do I need to take a copy of 
the queryset and order that?

Thank you for any assistance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/g9J4DZXYj-kJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to