Opened 10 years ago

Closed 9 years ago

#3659 closed (wontfix)

list_detail.object_detail should provide the item's page number

Reported by: anjohnson@… Owned by: nobody
Component: Generic views Version: master
Severity: Keywords: pagination
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The pagination in the list_detail generic views is great, but still not quite complete. Currently the list_detail.object_detail view doesn't provide the list_detail.object_list page number that the list item is found on, so I can't provide a link back to the exact page of the list view that shows this particular item. An "up" link that only points back to the beginning of the list isn't ideal for website usability. The addition of a paginate_by argument to the view should be an indication that the page number (and maybe the pages and hits values too) should be calculated and included in the template context.

Change History (3)

comment:1 Changed 10 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 9 years ago by James Bennett

This could be expensive; determining the page number requires an ObjectPaginator to be instantiated, and that has to do some potentially-expensive queries. I'd be -1 on this.

comment:3 Changed 9 years ago by Adrian Holovaty

Resolution: wontfix
Status: newclosed

I'm marking this as a wontfix for now. The object_detail generic view isn't necessarily used with pagination in all cases, so support for pagination would be crufty. Fortunately, it's easy enough for you to write a small view that wraps a generic view and sets extra_context.

Note: See TracTickets for help on using tickets.
Back to Top