aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/serializers.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/serializers.py')
-rw-r--r--rest_framework/serializers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index e7e93f38..84282cdb 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -108,6 +108,13 @@ class BaseSerializer(Field):
raise NotImplementedError('`create()` must be implemented.')
def save(self, **kwargs):
+ assert not hasattr(self, 'save_object'), (
+ 'Serializer `%s.%s` has old-style version 2 `.save_object()` '
+ 'that is no longer compatible with REST framework 3. '
+ 'Use the new-style `.create()` and `.update()` methods instead.' %
+ (self.__class__.__module__, self.__class__.__name__)
+ )
+
validated_data = dict(
list(self.validated_data.items()) +
list(kwargs.items())