ArchiveIndexView and YearIndexView compute the queryset twice
|Reported by:||Aymeric Augustin||Owned by:||Aymeric Augustin|
|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
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.