aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/pagination.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/pagination.py')
-rw-r--r--rest_framework/pagination.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py
index d51ea929..1f5749f1 100644
--- a/rest_framework/pagination.py
+++ b/rest_framework/pagination.py
@@ -43,8 +43,9 @@ class DefaultObjectSerializer(serializers.Field):
as the default.
"""
- def __init__(self, source=None, context=None):
- # Note: Swallow context kwarg - only required for eg. ModelSerializer.
+ def __init__(self, source=None, many=None, context=None):
+ # Note: Swallow context and many kwargs - only required for
+ # eg. ModelSerializer.
super(DefaultObjectSerializer, self).__init__(source=source)
@@ -82,7 +83,9 @@ class BasePaginationSerializer(serializers.Serializer):
else:
context_kwarg = {}
- self.fields[results_field] = object_serializer(source='object_list', **context_kwarg)
+ self.fields[results_field] = object_serializer(source='object_list',
+ many=True,
+ **context_kwarg)
class PaginationSerializer(BasePaginationSerializer):