Paginators#
Contains the Paginator classes for the FMA Django API.
- class fma_django_api.v1.paginators.BaseResultsSetPagination#
Bases:
PageNumberPagination
The Base Paginator used by other Pagination classes.
- get_paginated_response(data)#
Override the pagination response.
- display_page_controls = False#
- django_paginator_class#
alias of
Paginator
- get_html_context()#
- get_next_link()#
- get_page_number(request, paginator)#
- get_page_size(request)#
- get_paginated_response_schema(schema)#
- get_previous_link()#
- get_results(data)#
- get_schema_fields(view)#
- get_schema_operation_parameters(view)#
- invalid_page_message = 'Invalid page.'#
- last_page_strings = ('last',)#
- max_page_size = None#
- page_query_description = 'A page number within the paginated result set.'#
- page_query_param = 'page'#
- page_size = None#
- page_size_query_description = 'Number of results to return per page.'#
- page_size_query_param = None#
- paginate_queryset(queryset, request, view=None)#
Paginate a queryset if required, either returning a page object, or None if pagination is not configured for this view.
- template = 'rest_framework/pagination/numbers.html'#
- to_html()#
- class fma_django_api.v1.paginators.LargeResultsSetPagination#
Bases:
BaseResultsSetPagination
The Paginator used for large result sets.
- page_size = 100#
- page_size_query_param = 'page_size'#
- max_page_size = 200#
- display_page_controls = False#
- django_paginator_class#
alias of
Paginator
- get_html_context()#
- get_next_link()#
- get_page_number(request, paginator)#
- get_page_size(request)#
- get_paginated_response(data)#
Override the pagination response.
- get_paginated_response_schema(schema)#
- get_previous_link()#
- get_results(data)#
- get_schema_fields(view)#
- get_schema_operation_parameters(view)#
- invalid_page_message = 'Invalid page.'#
- last_page_strings = ('last',)#
- page_query_description = 'A page number within the paginated result set.'#
- page_query_param = 'page'#
- page_size_query_description = 'Number of results to return per page.'#
- paginate_queryset(queryset, request, view=None)#
Paginate a queryset if required, either returning a page object, or None if pagination is not configured for this view.
- template = 'rest_framework/pagination/numbers.html'#
- to_html()#
- class fma_django_api.v1.paginators.StandardResultsSetPagination#
Bases:
BaseResultsSetPagination
The Paginator used for small result sets.
- page_size = 10#
- page_size_query_param = 'page_size'#
- max_page_size = 20#
- display_page_controls = False#
- django_paginator_class#
alias of
Paginator
- get_html_context()#
- get_next_link()#
- get_page_number(request, paginator)#
- get_page_size(request)#
- get_paginated_response(data)#
Override the pagination response.
- get_paginated_response_schema(schema)#
- get_previous_link()#
- get_results(data)#
- get_schema_fields(view)#
- get_schema_operation_parameters(view)#
- invalid_page_message = 'Invalid page.'#
- last_page_strings = ('last',)#
- page_query_description = 'A page number within the paginated result set.'#
- page_query_param = 'page'#
- page_size_query_description = 'Number of results to return per page.'#
- paginate_queryset(queryset, request, view=None)#
Paginate a queryset if required, either returning a page object, or None if pagination is not configured for this view.
- template = 'rest_framework/pagination/numbers.html'#
- to_html()#