Opened 18 years ago

Closed 17 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: dev
Severity: Keywords: pagination
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by James Bennett, 17 years ago

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 by Adrian Holovaty, 17 years ago

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