Opened 14 years ago

Closed 11 years ago

Last modified 11 years ago

#15653 closed Bug (fixed)

minor errors in admin pagination custom tag

Reported by: jcumbo@… Owned by: Tim Graham <timograham@…>
Component: contrib.admin Version: 1.1
Severity: Normal Keywords: pagination
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description

in django.contrib.admin.templates.admin.templatetags.admin_list.py line 48, which currently reads

"page_range.extend(range(0, ON_EACH_SIDE - 1))"

should read

"page_range.extend(range(0, ON_ENDS))"

instead.

Problem is noticeable if you change ON_EACH_SIDE to a value to 2.

Attachments (4)

15653.diff (692 bytes ) - added by Adam Zapletal 14 years ago.
on_each_side_2_patched.png (26.9 KB ) - added by Adam Zapletal 14 years ago.
Admin pagination when ON_EACH_SIDE = 2 after patch
on_each_side_2.png (26.8 KB ) - added by Adam Zapletal 14 years ago.
Admin pagination when ON_EACH_SIDE = 2 before patch
15653_test.patch (2.5 KB ) - added by nott 12 years ago.
Regression test.

Download all attachments as: .zip

Change History (16)

by Adam Zapletal, 14 years ago

Attachment: 15653.diff added

by Adam Zapletal, 14 years ago

Attachment: on_each_side_2_patched.png added

Admin pagination when ON_EACH_SIDE = 2 after patch

by Adam Zapletal, 14 years ago

Attachment: on_each_side_2.png added

Admin pagination when ON_EACH_SIDE = 2 before patch

comment:1 by Julien Phalip, 14 years ago

Needs tests: set
Triage Stage: UnreviewedAccepted

Tests need to be written to prove that the end result remains unchanged after this fix :-)

comment:2 by Julien Phalip, 14 years ago

Has patch: set

comment:3 by Luke Plant, 14 years ago

Type: Bug

comment:4 by Luke Plant, 14 years ago

Severity: Normal

comment:5 by Julien Phalip, 13 years ago

UI/UX: set

comment:6 by Aymeric Augustin, 13 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 by Aymeric Augustin, 13 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 by Aymeric Augustin, 13 years ago

UI/UX: set

Revert accidental batch modification.

comment:9 by nott, 12 years ago

Owner: changed from nobody to nott
Status: newassigned

by nott, 12 years ago

Attachment: 15653_test.patch added

Regression test.

comment:10 by nott, 12 years ago

Owner: nott removed
Status: assignednew

comment:11 by Tim Graham <timograham@…>, 11 years ago

Owner: set to Tim Graham <timograham@…>
Resolution: fixed
Status: newclosed

In 5939864616d56cf949f0bca348a8e05230b62fe0:

Fixed #15653 - Error in admin pagination tag.

Thanks jcumbo@ for the report and adamzap
and nott for the patch.

comment:12 by Simon Charette <charette.s@…>, 11 years ago

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