Created
May 27, 2019 14:51
-
-
Save 63phc/fac0c05d6dd1123575f8676b00cb4215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework import pagination | |
from rest_framework.response import Response | |
class NewsPageNumberPagination(pagination.PageNumberPagination): | |
page_size_query_param = 'count' | |
max_page_size = 100 | |
def get_paginated_response(self, data): | |
return Response(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment