Opened 18 years ago

Closed 18 years ago

#2575 closed enhancement (fixed)

[patch] Make paginator work with lists and support orphans

Reported by: Chris Beaven Owned by: Adrian Holovaty
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: no UI/UX: no

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 Chris Beaven 18 years ago.
better_paginator.2.patch (5.1 KB ) - added by Chris Beaven 18 years ago.
oops, typos

Download all attachments as: .zip

Change History (7)

by Chris Beaven, 18 years ago

Attachment: better_paginator.patch added

by Chris Beaven, 18 years ago

Attachment: better_paginator.2.patch added

oops, typos

comment:1 by anonymous, 18 years ago

Summary: [patch] Make Paginator works with lists and support orphans[patch] Make paginator work with lists and support orphans

comment:2 by anonymous, 18 years ago

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

comment:3 by Chris Beaven, 18 years ago

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 by Chris Beaven, 18 years ago

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

comment:5 by Jacob, 18 years ago

Resolution: fixed
Status: newclosed

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

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