#18139: ArchiveIndexView and YearIndexView compute the queryset twice
-----------------------------------------+------------------------
               Reporter:  aaugustin      |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Generic views  |        Version:  1.4
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  1
    Needs documentation:  0              |    Needs tests:  1
Patch needs improvement:  1              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 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.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18139>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to