apps.api.pagination module

class apps.api.pagination.CursorPagination

Bases: rest_framework.pagination.CursorPagination

When using PagePagination, if user asks for page N, then an item is added somehow, and then user asks for page N+1, the last item of page N can be shown again as the first item in page N+1. This doesn’t happen with CursorPagination, which keeps references to objects, and does not have to calculate content for each page.

ordering = '-updated'
page_size = 10
page_size_query_param = 'page_size'
class apps.api.pagination.StandardPagination

Bases: rest_framework.pagination.PageNumberPagination

max_page_size = 1000
page_size = 10
page_size_query_param = 'page_size'