mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
ReturnDict and ReturnList repr as standard dict/list. Closes #2421.
This commit is contained in:
parent
da1db34a36
commit
0dffc46cb7
|
@ -16,6 +16,9 @@ class ReturnDict(OrderedDict):
|
||||||
def copy(self):
|
def copy(self):
|
||||||
return ReturnDict(self, serializer=self.serializer)
|
return ReturnDict(self, serializer=self.serializer)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return dict.__repr__(self)
|
||||||
|
|
||||||
|
|
||||||
class ReturnList(list):
|
class ReturnList(list):
|
||||||
"""
|
"""
|
||||||
|
@ -27,6 +30,9 @@ class ReturnList(list):
|
||||||
self.serializer = kwargs.pop('serializer')
|
self.serializer = kwargs.pop('serializer')
|
||||||
super(ReturnList, self).__init__(*args, **kwargs)
|
super(ReturnList, self).__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return list.__repr__(self)
|
||||||
|
|
||||||
|
|
||||||
class BoundField(object):
|
class BoundField(object):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user