diff options
| author | Tom Christie | 2012-11-22 02:05:46 -0800 |
|---|---|---|
| committer | Tom Christie | 2012-11-22 02:05:46 -0800 |
| commit | ba553b7dcdb232079cb04e6d7cd673d39cc99695 (patch) | |
| tree | 4ba4c0cceea3ca001665560619313aed1c9624b8 /rest_framework/serializers.py | |
| parent | b0bad35ef0972ec26ff808d81b1f43f16683898d (diff) | |
| parent | 0876bed96304c3c2125e0de67736d40bfe921cf7 (diff) | |
| download | django-rest-framework-ba553b7dcdb232079cb04e6d7cd673d39cc99695.tar.bz2 | |
Merge pull request #438 from maspwr/partial-update
Add support for partial serializer updates
Diffstat (limited to 'rest_framework/serializers.py')
| -rw-r--r-- | rest_framework/serializers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 9f4964fa..53dcec16 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 {} |
