Back to bricks list
Introduction
Technical Documentation
Other Classes
Paginator
Version

Paginator

Paginator class

:property number_of_items_per_page: The default number of items per page :type number_of_items_per_page: int

Attributes

page_info: PageInforesults: List

Functions

__INIT__

Initialize self. See help(type(self)) for accurate signature.

Parameters:
NameTypeDefault valueDescription
queryModelSelect
pageint 0
nb_of_items_per_pageint 20
nb_max_of_items_per_pageint 100
FILTER

Filter the current items in the paginators, the total count become approximate

                      greater than this value.
Parameters:
NameTypeDefault valueDescription
filter_Callable
min_nb_of_resultint 0 If provided, the query will be called multiple time until the number of result is ``
MAP_RESULT

Set a function that will be call on each element to convert the result element

Parameters:
NameTypeDefault valueDescription
map_resultCallable _description_ [[paginatortype], any]
TO_DTO
Return type:
PageDTO