accept all WritableField kwargs for writable serializers (eg required=True)

This commit is contained in:
Craig de Stigter 2013-03-18 14:27:15 +13:00
parent ee20cf806b
commit c8416df0c4

View File

@ -129,8 +129,8 @@ class BaseSerializer(WritableField):
_dict_class = SortedDictWithMetadata
def __init__(self, instance=None, data=None, files=None,
context=None, partial=False, many=None, source=None):
super(BaseSerializer, self).__init__(source=source)
context=None, partial=False, many=None, **kwargs):
super(BaseSerializer, self).__init__(**kwargs)
self.opts = self._options_class(self.Meta)
self.parent = None
self.root = None