fasjson.web.utils package¶
Submodules¶
fasjson.web.utils.ipa module¶
fasjson.web.utils.pagination module¶
- fasjson.web.utils.pagination.add_page_data(output, result, model)[source]¶
Use the pagination data from the LDAP result to add page info to the output.
This function adds a dictionary with pagination info in a
page
key in the output dictionary. The pagination dictionary contains:page_number
: the current page numberpage_size
: the number of items per pagetotal_results
: the total number of items in the entire recordsettotal_pages
: the number of pages availablenext_page
: the URL to the next page if there is one. On the last page, this key is absent.
If the query was not paginated, this
page
dictionary is not added to the output dictionary.This function does not return anything, the output dictionary is modified in-place.