Opened 13 years ago

Closed 11 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


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) (4.1 KB) - added by Adrian Holovaty 13 years ago.
Unfinished implementation of MultiObjectPaginator

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by Adrian Holovaty

Attachment: added

Unfinished implementation of MultiObjectPaginator

comment:1 Changed 12 years ago by Chris Beaven

Triage Stage: UnreviewedDesign decision needed

Is this going anywhere, adrian?

comment:2 Changed 12 years ago by Russell Keith-Magee

Triage Stage: Design decision neededAccepted

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

comment:3 Changed 11 years ago by Pete Crosier

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

comment:4 Changed 11 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

The new Paginator class from [7306] handles this.

comment:5 Changed 11 years ago by Chris Beaven

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 Changed 11 years ago by Adrian Holovaty

Resolution: wontfix
Status: reopenedclosed

Closing because the use-case is pretty rare.

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