ArchiveIndexView and YearIndexView compute the queryset twice
|Reported by:||aaugustin||Owned by:||aaugustin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||yes|
In the debug toolbar, I noticed that the queryset is evaluated twice, with a different ordering. The call to order_by in get_dated_items appears to be the culprit.
I'm attaching a patch that resolves the issue, but it may not be backwards compatible -- the order of objects in classes inheriting BaseDateListView may change.