Skip to content

Instantly share code, notes, and snippets.

@mansha99
Created July 7, 2023 07:22
Show Gist options
  • Save mansha99/85984dd9f7578af5d3c093b05d7e62c7 to your computer and use it in GitHub Desktop.
Save mansha99/85984dd9f7578af5d3c093b05d7e62c7 to your computer and use it in GitHub Desktop.
notices/pagination.py
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