Code

Opened 3 years ago

Closed 11 months ago

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

Download all attachments as: .zip

Change History (16)

Changed 3 years ago by adamzap

Changed 3 years ago by adamzap

Admin pagination when ON_EACH_SIDE = 2 after patch

Changed 3 years ago by adamzap

Admin pagination when ON_EACH_SIDE = 2 before patch

comment:1 Changed 3 years ago by julien

  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

comment:2 Changed 3 years ago by julien

  • Has patch set

comment:3 Changed 3 years ago by lukeplant

  • Type set to Bug

comment:4 Changed 3 years ago by lukeplant

  • Severity set to Normal

comment:5 Changed 3 years ago by julien

  • UI/UX set

comment:6 Changed 2 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:7 Changed 2 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:8 Changed 2 years ago by aaugustin

  • UI/UX set

Revert accidental batch modification.

comment:9 Changed 11 months ago by nott

  • Owner changed from nobody to nott
  • Status changed from new to assigned

Changed 11 months ago by nott

Regression test.

comment:10 Changed 11 months ago by nott

  • Owner nott deleted
  • Status changed from assigned to new

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

  • Owner set to Tim Graham <timograham@…>
  • Resolution set to fixed
  • Status changed from new to closed

In 5939864616d56cf949f0bca348a8e05230b62fe0:

Fixed #15653 - Error in admin pagination tag.

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

comment:12 Changed 11 months ago by Simon Charette <charette.s@…>

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.