add setting DEFAULT_PAGINATOR_CLASS

This commit is contained in:
Иван Юрин 2013-09-12 16:41:52 +06:00
parent 2139dafef6
commit 89eba7788f
2 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class GenericAPIView(views.APIView):
# The following attributes may be subject to change,
# and should be considered private API.
model_serializer_class = api_settings.DEFAULT_MODEL_SERIALIZER_CLASS
paginator_class = Paginator
paginator_class = api_settings.DEFAULT_PAGINATOR_CLASS
######################################
# These are pending deprecation...

View File

@ -56,6 +56,8 @@ DEFAULTS = {
'rest_framework.serializers.ModelSerializer',
'DEFAULT_PAGINATION_SERIALIZER_CLASS':
'rest_framework.pagination.PaginationSerializer',
'DEFAULT_PAGINATOR_CLASS':
'django.core.paginator.Paginator',
'DEFAULT_FILTER_BACKENDS': (),
# Throttling
@ -127,6 +129,7 @@ IMPORT_STRINGS = (
'DEFAULT_CONTENT_NEGOTIATION_CLASS',
'DEFAULT_MODEL_SERIALIZER_CLASS',
'DEFAULT_PAGINATION_SERIALIZER_CLASS',
'DEFAULT_PAGINATOR_CLASS',
'DEFAULT_FILTER_BACKENDS',
'EXCEPTION_HANDLER',
'FILTER_BACKEND',