Django

Code

Ticket #2575 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] Make paginator work with lists and support orphans

Reported by: SmileyChris Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

better_paginator.patch (5.2 kB) - added by SmileyChris on 08/20/06 18:27:05.
better_paginator.2.patch (5.1 kB) - added by SmileyChris on 08/20/06 18:33:42.
oops, typos

Change History

08/20/06 18:27:05 changed by SmileyChris

  • attachment better_paginator.patch added.

08/20/06 18:33:42 changed by SmileyChris

  • attachment better_paginator.2.patch added.

oops, typos

08/20/06 18:47:17 changed by anonymous

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

09/06/06 20:14:01 changed by anonymous

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

09/11/06 19:00:22 changed 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.

10/08/06 15:21:28 changed by SmileyChris

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

11/06/06 22:44:27 changed by jacob

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #2575 ([patch] Make paginator work with lists and support orphans)




Change Properties
Action