Created
July 7, 2023 07:22
-
-
Save mansha99/85984dd9f7578af5d3c093b05d7e62c7 to your computer and use it in GitHub Desktop.
notices/pagination.py
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 | |
class CustomPagination(pagination.PageNumberPagination): | |
page_size = 2 | |
page_size_query_param = 'page_size' | |
max_page_size = 50 | |
page_query_param = 'p' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment