Django

Code

Ticket #1374 (reopened)

Opened 2 years ago

Last modified 2 months ago

Add MultiObjectPaginator, which can paginate across different types of objects

Reported by: adrian Assigned to: nobody
Component: Tools Version:
Keywords: Cc:
Triage Stage: Accepted Has patch: 1
Needs documentation: 1 Needs tests: 1
Patch needs improvement: 0

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

paginatorNEW.py (4.1 kB) - added by adrian on 02/18/06 16:19:47.
Unfinished implementation of MultiObjectPaginator?

Change History

02/18/06 16:19:47 changed by adrian

  • attachment paginatorNEW.py added.

Unfinished implementation of MultiObjectPaginator?

01/21/07 22:16:50 changed by SmileyChris

  • stage changed from Unreviewed to Design decision needed.

Is this going anywhere, adrian?

09/11/07 07:45:07 changed by russellm

  • stage changed from Design decision needed to Accepted.

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

02/22/08 15:48:29 changed by PJCrosier

  • needs_docs set to 1.
  • has_patch set to 1.
  • needs_tests set to 1.

03/18/08 16:37:57 changed by adrian

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

The new Paginator class from [7306] handles this.

03/18/08 19:55:26 changed by SmileyChris

  • status changed from closed to reopened.
  • resolution deleted.

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).


Add/Change #1374 (Add MultiObjectPaginator, which can paginate across different types of objects)




Change Properties
Action