Code

Opened 8 years ago

Closed 7 years ago

#2575 closed enhancement (fixed)

[patch] Make paginator work with lists and support orphans

Reported by: SmileyChris Owned by: adrian
Component: Core (Other) 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

(splitting #2093 into two seperate tickets)

There's no orphan feature for the paginator. For example:

22 records, num_per_page=10, orphan=2 --> pages==2, len(self.get_page(1))==12

The paginator should work with lists too.

The patch fixes these and also provides more accurate validation.

Attachments (2)

better_paginator.patch (5.2 KB) - added by SmileyChris 8 years ago.
better_paginator.2.patch (5.1 KB) - added by SmileyChris 8 years ago.
oops, typos

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by SmileyChris

Changed 8 years ago by SmileyChris

oops, typos

comment:1 Changed 8 years ago by anonymous

  • Summary changed from [patch] Make Paginator works with lists and support orphans to [patch] Make paginator work with lists and support orphans

comment:2 Changed 8 years ago by anonymous

and this hasn't been applied to the trunk because...?

comment:3 Changed 8 years ago by SmileyChris

Patience is needed :)
As the FAQ says, it's a matter of prioritization and this is not a critical thing.

I do think that perhaps Django needs a few more developers with commit access.

comment:4 Changed 8 years ago by SmileyChris

(#2576 is the other half of the original #2093 ticket)

comment:5 Changed 7 years ago by jacob

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

(In [4041]) Fixed #2575: ObjectPaginator now accepts a "orphans" option to prevent pages with only a few items. Thanks, SmileyChris.

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.