mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 04:20:12 +03:00
Merge 0a91f9cbda
into 916a4a27ef
This commit is contained in:
commit
2955ed34eb
|
@ -6,13 +6,14 @@ def pagination_system_check(app_configs, **kwargs):
|
||||||
errors = []
|
errors = []
|
||||||
# Use of default page size setting requires a default Paginator class
|
# Use of default page size setting requires a default Paginator class
|
||||||
from rest_framework.settings import api_settings
|
from rest_framework.settings import api_settings
|
||||||
if api_settings.PAGE_SIZE and not api_settings.DEFAULT_PAGINATION_CLASS:
|
if api_settings.PAGE_SIZE and ("DEFAULT_PAGINATION_CLASS" not in api_settings.user_settings):
|
||||||
errors.append(
|
errors.append(
|
||||||
Warning(
|
Warning(
|
||||||
"You have specified a default PAGE_SIZE pagination rest_framework setting,"
|
"You have specified a default PAGE_SIZE pagination rest_framework setting,"
|
||||||
"without specifying also a DEFAULT_PAGINATION_CLASS.",
|
"without specifying also a DEFAULT_PAGINATION_CLASS.",
|
||||||
hint="The default for DEFAULT_PAGINATION_CLASS is None. "
|
hint="The default for DEFAULT_PAGINATION_CLASS is None. "
|
||||||
"In previous versions this was PageNumberPagination",
|
"In previous versions this was PageNumberPagination",
|
||||||
|
"PAGE_SIZE needs specifying a DEFAULT_PAGINATION_CLASS Even though the value is None,"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return errors
|
return errors
|
||||||
|
|
Loading…
Reference in New Issue
Block a user