Skip to content

Commit 91695fb

Browse files
Fix setting typo
Co-authored-by: Roman Gorbil <[email protected]>
1 parent 1ada7c7 commit 91695fb

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

rest_framework/pagination.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,6 @@ class PageNumberPagination(BasePagination):
172172
# The default page size.
173173
# Defaults to `None`, meaning pagination is disabled.
174174
page_size = api_settings.PAGE_SIZE
175-
# The maximum page size.
176-
# Defaults to `None`, meaning page size is unlimited.
177-
# It's recommended that you would set a limit to avoid api abuse.
178-
page_size = api_settings.MAX_PAGE_SIZE
179175

180176
django_paginator_class = DjangoPaginator
181177

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

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

195193
last_page_strings = ('last',)
196194

@@ -604,7 +602,7 @@ class CursorPagination(BasePagination):
604602

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

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

0 commit comments

Comments
 (0)