aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils/serializer_helpers.py
diff options
context:
space:
mode:
authorTom Christie2014-12-15 11:55:17 +0000
committerTom Christie2014-12-15 11:55:17 +0000
commit72e08a3e8b6427cb93f0f98b42724e31e5b3d8f9 (patch)
tree9d2fe5ded957a5e1c6d86ac87aeafb4be3055ab2 /rest_framework/utils/serializer_helpers.py
parenta72f812d80a4000e86a5ad96001f3fbf43fe310a (diff)
downloaddjango-rest-framework-72e08a3e8b6427cb93f0f98b42724e31e5b3d8f9.tar.bz2
Use unicode internally everywhere for 'repr'
Diffstat (limited to 'rest_framework/utils/serializer_helpers.py')
-rw-r--r--rest_framework/utils/serializer_helpers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/rest_framework/utils/serializer_helpers.py b/rest_framework/utils/serializer_helpers.py
index 277cf649..65a04d06 100644
--- a/rest_framework/utils/serializer_helpers.py
+++ b/rest_framework/utils/serializer_helpers.py
@@ -1,5 +1,6 @@
+from __future__ import unicode_literals
import collections
-from rest_framework.compat import OrderedDict
+from rest_framework.compat import OrderedDict, unicode_to_repr
class ReturnDict(OrderedDict):
@@ -47,9 +48,9 @@ class BoundField(object):
return self._field.__class__
def __repr__(self):
- return '<%s value=%s errors=%s>' % (
+ return unicode_to_repr('<%s value=%s errors=%s>' % (
self.__class__.__name__, self.value, self.errors
- )
+ ))
class NestedBoundField(BoundField):