Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#1033 closed enhancement (fixed)

[patch] Generic view `list_detail` pagination should be one-indexed in URL

Reported by: Tom Tobin <korpios@…> Owned by: jacob
Component: Generic views Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

While having the ObjectPaginator class be zero-indexed internally makes sense, having the GET variable for the current page number also be zero-indexed doesn't; one-indexed numbers are all a user should have to understand, and it's doubly confusing to be visiting a page claiming to be "3 of 4" yet have ?page=2 in the URL.

The attached patch fixes the list_detail generic view to be one-indexed, while leaving ObjectPaginator alone (i.e., zero-indexed).

Attachments (1)

list_detail_oneindexed.diff (1.4 KB) - added by Tom Tobin <korpios@…> 10 years ago.
Implements one-indexed list_detail generic view

Download all attachments as: .zip

Change History (3)

Changed 10 years ago by Tom Tobin <korpios@…>

Implements one-indexed list_detail generic view

comment:1 Changed 9 years ago by jacob

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

(In [2426]) Fixed #1033 -- pagination in object_list generic views now use 1-indexed page numbers in the URL. Thanks, Tom Tobin.

comment:2 Changed 8 years ago by korpios

  • Reporter changed from Tom Tobin <korpios@…> to Tom Tobin <korpios@…>
Note: See TracTickets for help on using tickets.
Back to Top