PaginationMixin

class djmvc.views.pagination.PaginationMixin[source]

Bases: object

Page size and page navigation for list views.

paginate_by

Default rows per page. None disables pagination.

Type:

int | None

per_page_options

Comma-separated allowed page sizes for the per-page selector.

Type:

str

page_kwarg

GET parameter for the current page number.

Type:

str

per_page_kwarg

GET parameter for the selected page size.

Type:

str

pagination_target

Unpoly up-target for pagination controls.

Type:

str

get_paginate_by(queryset=None)[source]

Rows per page from GET or paginate_by default.

property resolved_per_page

Validated page size from GET or paginate_by.

property page

Current Page object, if paginated.

property paginator

Paginator for the current list queryset.

pagination_url(page_number)[source]

URL for page_number preserving other GET parameters.

property pagination_form_attributes

HTML attributes for pagination control forms.

property per_page_option_list

Allowed page sizes from per_page_options.