#2576: [patch] PaginatorPage object
----------------------------+-----------------------------------------------
Reporter: SmileyChris | Owner: adrian
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Core framework | Version:
Severity: normal | Keywords:
----------------------------+-----------------------------------------------
{{{
#!python
class PaginatorPage:
"""
This class is used to work with a page of a paginator object.
Pass a paginator object, and a valid page number.
It uses the same methods as a paginator, except you do not need
to use a page number.
"""
}}}
So it's just a page aware paginator object wrapper.
For example, if you have a paginator object in a view, you can set up a
!PaginatorPage object (passing the paginator and current page number) and
then pass this object directly to your template.
* It can work in a different base (base-1 is nice to work with at a
template level)
* It can return the next / previous page number
--
Ticket URL: <http://code.djangoproject.com/ticket/2576>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---