saturdayplace
unread,Oct 19, 2009, 4:31:09 PM10/19/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django developers
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?