@@ -172,10 +172,6 @@ class PageNumberPagination(BasePagination):
172
172
# The default page size.
173
173
# Defaults to `None`, meaning pagination is disabled.
174
174
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
179
175
180
176
django_paginator_class = DjangoPaginator
181
177
@@ -190,7 +186,9 @@ class PageNumberPagination(BasePagination):
190
186
191
187
# Set to an integer to limit the maximum page size the client may request.
192
188
# 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
194
192
195
193
last_page_strings = ('last' ,)
196
194
@@ -604,7 +602,7 @@ class CursorPagination(BasePagination):
604
602
605
603
# Set to an integer to limit the maximum page size the client may request.
606
604
# 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
608
606
609
607
# The offset in the cursor is used in situations where we have a
610
608
# nearly-unique index. (Eg millisecond precision creation timestamps)
0 commit comments