Opened 17 years ago

Closed 17 years ago

#5206 closed (invalid)

next / previous object container tags within queryset

Reported by: drackett@… Owned by: Adrian Holovaty
Component: Template system Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I think it would be a good to be able to get the next or previous item within a given queryset instead of just within the current model.

Change History (1)

comment:1 by Malcolm Tredinnick, 17 years ago

Resolution: invalid
Status: newclosed

Querysets satisfy the iterator protocol and the elements come out in the order you specify in the query. So you can already do this (if you really need to go backwards, you'd have to capture the previous results along the way, or else convert the queryset to a list, but both of those are easy).

If you have questions about how to accomplish things like this, ask on the django-users list.

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