Opened 18 years ago

Closed 18 years ago

Last modified 17 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: no UI/UX: no

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@…> 18 years ago.
Implements one-indexed list_detail generic view

Download all attachments as: .zip

Change History (3)

by Tom Tobin <korpios@…>, 18 years ago

Attachment: list_detail_oneindexed.diff added

Implements one-indexed list_detail generic view

comment:1 by Jacob, 18 years ago

Resolution: fixed
Status: newclosed

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

comment:2 by korpios, 17 years ago

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