diff options
| author | Tom Christie | 2014-09-11 21:48:54 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-11 21:48:54 +0100 |
| commit | 040bfcc09c851bb3dadd60558c78a1f7937e9fbd (patch) | |
| tree | 4af85b2ee317528a080422e5893cc01fae079dcb /rest_framework/pagination.py | |
| parent | a7518719917c7ad8e699119b442cfeb568ba1dde (diff) | |
| download | django-rest-framework-040bfcc09c851bb3dadd60558c78a1f7937e9fbd.tar.bz2 | |
NotImplemented stubs for Field, and DecimalField improvements
Diffstat (limited to 'rest_framework/pagination.py')
| -rw-r--r-- | rest_framework/pagination.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index 9cf31629..d82d2d3b 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -37,7 +37,7 @@ class PreviousPageField(serializers.Field): return replace_query_param(url, self.page_field, page) -class DefaultObjectSerializer(serializers.Field): +class DefaultObjectSerializer(serializers.ReadOnlyField): """ If no object serializer is specified, then this serializer will be applied as the default. @@ -79,6 +79,6 @@ class PaginationSerializer(BasePaginationSerializer): """ A default implementation of a pagination serializer. """ - count = serializers.Field(source='paginator.count') + count = serializers.ReadOnlyField(source='paginator.count') next = NextPageField(source='*') previous = PreviousPageField(source='*') |
