Clarify pagination system check (#5524)

* Add `id` to allow silencing.
* Expand `hint` to clarify.

Ref #5170 Closes #5523
This commit is contained in:
Carlton Gibson 2017-10-23 12:31:59 +02:00 committed by GitHub
parent 916a4a27ef
commit 1c9ad52cb6

View File

@ -12,7 +12,10 @@ def pagination_system_check(app_configs, **kwargs):
"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. "
"If you wish to define PAGE_SIZE globally whilst defining "
"pagination_class on a per-view basis you may silence this check.",
id="rest_framework.W001"
) )
) )
return errors return errors