api: allow setting of page size

This commit is contained in:
Jens Langhammer 2020-12-01 11:58:14 +01:00
parent 93bf977709
commit 93bfe60369

View file

@ -6,6 +6,8 @@ from rest_framework.response import Response
class Pagination(pagination.PageNumberPagination):
"""Pagination which includes total pages and current page"""
page_size_query_param = "page_size"
def get_paginated_response(self, data):
previous_page_number = 0
if self.page.has_previous():