Opened 6 years ago

Closed 4 years ago

Last modified 4 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 6 years ago.
on_each_side_2_patched.png (26.9 KB) - added by Adam Zapletal 6 years ago.
Admin pagination when ON_EACH_SIDE = 2 after patch
on_each_side_2.png (26.8 KB) - added by Adam Zapletal 6 years ago.
Admin pagination when ON_EACH_SIDE = 2 before patch
15653_test.patch (2.5 KB) - added by nott 4 years ago.
Regression test.

Download all attachments as: .zip

Change History (16)

Changed 6 years ago by Adam Zapletal

Attachment: 15653.diff added

Changed 6 years ago by Adam Zapletal

Attachment: on_each_side_2_patched.png added

Admin pagination when ON_EACH_SIDE = 2 after patch

Changed 6 years ago by Adam Zapletal

Attachment: on_each_side_2.png added

Admin pagination when ON_EACH_SIDE = 2 before patch

comment:1 Changed 6 years ago by Julien Phalip

Needs tests: set
Triage Stage: UnreviewedAccepted

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

comment:2 Changed 6 years ago by Julien Phalip

Has patch: set

comment:3 Changed 6 years ago by Luke Plant

Type: Bug

comment:4 Changed 6 years ago by Luke Plant

Severity: Normal

comment:5 Changed 5 years ago by Julien Phalip

UI/UX: set

comment:6 Changed 5 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:7 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:8 Changed 5 years ago by Aymeric Augustin

UI/UX: set

Revert accidental batch modification.

comment:9 Changed 4 years ago by nott

Owner: changed from nobody to nott
Status: newassigned

Changed 4 years ago by nott

Attachment: 15653_test.patch added

Regression test.

comment:10 Changed 4 years ago by nott

Owner: nott deleted
Status: assignednew

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

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 Changed 4 years ago by Simon Charette <charette.s@…>

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