@@ -173,10 +173,6 @@ class PageNumberPagination(BasePagination):
173
173
# The default page size.
174
174
# Defaults to `None`, meaning pagination is disabled.
175
175
page_size = api_settings .PAGE_SIZE
176
- # The maximum page size.
177
- # Defaults to `None`, meaning page size is unlimited.
178
- # It's recommended that you would set a limit to avoid api abuse.
179
- page_size = api_settings .MAX_PAGE_SIZE
180
176
181
177
django_paginator_class = DjangoPaginator
182
178
@@ -191,7 +187,9 @@ class PageNumberPagination(BasePagination):
191
187
192
188
# Set to an integer to limit the maximum page size the client may request.
193
189
# Only relevant if 'page_size_query_param' has also been set.
194
- max_page_size = None
190
+ # Defaults to `None`, meaning page size is unlimited.
191
+ # It's recommended that you would set a limit to avoid api abuse.
192
+ max_page_size = api_settings .MAX_PAGE_SIZE
195
193
196
194
last_page_strings = ('last' ,)
197
195
@@ -605,7 +603,7 @@ class CursorPagination(BasePagination):
605
603
606
604
# Set to an integer to limit the maximum page size the client may request.
607
605
# Only relevant if 'page_size_query_param' has also been set.
608
- max_page_size = None
606
+ max_page_size = api_settings . MAX_PAGE_SIZE
609
607
610
608
# The offset in the cursor is used in situations where we have a
611
609
# nearly-unique index. (Eg millisecond precision creation timestamps)
0 commit comments