Skip to content

pagination bug #9038

Answered by shourav9884
zcjwin asked this question in General
Discussion options

You must be logged in to vote

@zcjwin, it is described in the documentation that the default value of page_size_query_param is None so that the client may not control the requested page size.

page_size_query_param - If set, this is a string value indicating the name of a query parameter that allows the client to set the page size on a per-request basis. Defaults to None, indicating that the client may not control the requested page size.

ref: Official documentation

But you can set PAGE_SIZE globally in your settings. Example:

REST_FRAMEWORK = {
    'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
    'PAGE_SIZE': 100
}

Even you can modify this behavior of PageNumberPagination by creating…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by auvipy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #9002 on July 06, 2023 05:30.