Skip to content

Commit

Permalink
Fix setting typo
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Gorbil <[email protected]>
  • Loading branch information
TheSuperiorStanislav and ron8mcr committed Aug 21, 2024
1 parent 1ada7c7 commit 91695fb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions rest_framework/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ class PageNumberPagination(BasePagination):
# The default page size.
# Defaults to `None`, meaning pagination is disabled.
page_size = api_settings.PAGE_SIZE
# The maximum page size.
# Defaults to `None`, meaning page size is unlimited.
# It's recommended that you would set a limit to avoid api abuse.
page_size = api_settings.MAX_PAGE_SIZE

django_paginator_class = DjangoPaginator

Expand All @@ -190,7 +186,9 @@ class PageNumberPagination(BasePagination):

# Set to an integer to limit the maximum page size the client may request.
# Only relevant if 'page_size_query_param' has also been set.
max_page_size = None
# Defaults to `None`, meaning page size is unlimited.
# It's recommended that you would set a limit to avoid api abuse.
max_page_size = api_settings.MAX_PAGE_SIZE

last_page_strings = ('last',)

Expand Down Expand Up @@ -604,7 +602,7 @@ class CursorPagination(BasePagination):

# Set to an integer to limit the maximum page size the client may request.
# Only relevant if 'page_size_query_param' has also been set.
max_page_size = None
max_page_size = api_settings.MAX_PAGE_SIZE

# The offset in the cursor is used in situations where we have a
# nearly-unique index. (Eg millisecond precision creation timestamps)
Expand Down

0 comments on commit 91695fb

Please sign in to comment.