mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
.copy() for serializer .data and .errors dictionaries
This commit is contained in:
parent
e399140031
commit
a16a8a10a9
|
@ -11,6 +11,9 @@ class ReturnDict(OrderedDict):
|
||||||
self.serializer = kwargs.pop('serializer')
|
self.serializer = kwargs.pop('serializer')
|
||||||
super(ReturnDict, self).__init__(*args, **kwargs)
|
super(ReturnDict, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
def copy(self):
|
||||||
|
return ReturnDict(self, serializer=self.serializer)
|
||||||
|
|
||||||
|
|
||||||
class ReturnList(list):
|
class ReturnList(list):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user