[patch] PaginatorPage object
|Reported by:||SmileyChris||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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