class documentation
class Paginator: (source)
Undocumented
Method | __init__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | get |
Return a 1-based range of pages with some values elided. |
Method | get |
Return a valid page, even if the page argument isn't a number or isn't in range. |
Method | page |
Return a Page object for the given 1-based page number. |
Method | validate |
Validate the given 1-based page number. |
Constant | ELLIPSIS |
Undocumented |
Instance Variable | allow |
Undocumented |
Instance Variable | object |
Undocumented |
Instance Variable | orphans |
Undocumented |
Instance Variable | per |
Undocumented |
Property | count |
Return the total number of objects, across all pages. |
Property | num |
Return the total number of pages. |
Property | page |
Return a 1-based range of pages for iterating through within a template for loop. |
Method | _check |
Warn if self.object_list is unordered (typically a QuerySet). |
Method | _get |
Return an instance of a single page. |
Return a 1-based range of pages with some values elided. If the page range is larger than a given size, the whole range is not provided and a compact form is returned instead, e.g. for a paginator with 50 pages, if page 43 were the current page, the output, with the default arguments, would be: 1, 2, …, 40, 41, 42, 43, 44, 45, 46, …, 49, 50.