Opened 9 years ago

Closed 8 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:


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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 9 years ago by ubernostrum

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 8 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

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