aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/serializers.py
diff options
context:
space:
mode:
authorMark Aaron Shirley2012-11-20 11:01:21 -0800
committerMark Aaron Shirley2012-11-20 11:01:21 -0800
commitc3644234cda5c457d72baf1fbf145f12f49a1fa4 (patch)
tree6fd9f7a9434b32e0f8e6bbe54527e777b335126e /rest_framework/serializers.py
parentd22daa04e654f0d5410fa610bc5865b5b29b758f (diff)
downloaddjango-rest-framework-c3644234cda5c457d72baf1fbf145f12f49a1fa4.tar.bz2
Add support for partial serializer updates
Diffstat (limited to 'rest_framework/serializers.py')
-rw-r--r--rest_framework/serializers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index 2e7e2cf5..229c1b2c 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -91,12 +91,13 @@ class BaseSerializer(Field):
_options_class = SerializerOptions
_dict_class = SortedDictWithMetadata # Set to unsorted dict for backwards compatibility with unsorted implementations.
- def __init__(self, instance=None, data=None, files=None, context=None, **kwargs):
+ def __init__(self, instance=None, data=None, files=None, context=None, partial=False, **kwargs):
super(BaseSerializer, self).__init__(**kwargs)
self.opts = self._options_class(self.Meta)
self.fields = copy.deepcopy(self.base_fields)
self.parent = None
self.root = None
+ self.partial = partial
self.context = context or {}