Opened 19 years ago

Closed 16 years ago

#1374 closed enhancement (wontfix)

Add MultiObjectPaginator, which can paginate across different types of objects

Reported by: Adrian Holovaty Owned by: nobody
Component: Tools Version:
Severity: trivial Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've had this lying around for the past couple of months. Pasting it here because I don't have time to continue working on it.

This introduces a MultiObjectPaginator class, which is like ObjectPaginator but paginates across different types of objects. For example, if paginating across books and CDs, it would take care of displaying books first, then CDs (or vice versa, depending on the ordering preference), and it would handle pagination properly.

Attachments (1)

paginatorNEW.py (4.1 KB ) - added by Adrian Holovaty 19 years ago.
Unfinished implementation of MultiObjectPaginator

Download all attachments as: .zip

Change History (7)

by Adrian Holovaty, 19 years ago

Attachment: paginatorNEW.py added

Unfinished implementation of MultiObjectPaginator

comment:1 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign decision needed

Is this going anywhere, adrian?

comment:2 by Russell Keith-Magee, 17 years ago

Triage Stage: Design decision neededAccepted

Its safe to assume that if Adrian opened it originally, the idea has been accepted.

comment:3 by Pete Crosier, 17 years ago

Has patch: set
Needs documentation: set
Needs tests: set

comment:4 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: newclosed

The new Paginator class from [7306] handles this.

comment:5 by Chris Beaven, 17 years ago

Resolution: fixed
Status: closedreopened

From a skim through of the new paginator stuff, I can't see that it fixes this yet.

The trick is we want to be able to check the combined length of the multiple querysets without actually causing them to all be iterated (otherwise we could do a simple iter.chain).

comment:6 by Adrian Holovaty, 16 years ago

Resolution: wontfix
Status: reopenedclosed

Closing because the use-case is pretty rare.

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