The date_based.archive_index generic view ALWAYS returns a list of
objects ordered by "-date_field", regardless of the queryset it's
been given. I was taken off-guard by this when trying to get the list
to display in a template in "date_field" order. I can get the output
I want by doing {% for obj in list reversed %}, but I think it makes
more sense for the ordering to be determined by the queryset
argument.
By default, querysets are returned in the order determinied by the
ordering option in its Model's meta class, or you can specify the
order with the .order_by() queryset method. Is there a reason for
keeping "-date_field" as the ONLY way to get the list from
archive_index?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---