aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/utils
diff options
context:
space:
mode:
authorTom Christie2014-12-15 09:13:02 +0000
committerTom Christie2014-12-15 09:13:02 +0000
commit5e7c9687c7e11b6adfe2fc534eb0504e67ca9fc9 (patch)
tree8a6132031a0535e86efcbef5669ee4bb17825fc2 /rest_framework/utils
parenta72f812d80a4000e86a5ad96001f3fbf43fe310a (diff)
downloaddjango-rest-framework-5e7c9687c7e11b6adfe2fc534eb0504e67ca9fc9.tar.bz2
First pass at serializer repr bug
Diffstat (limited to 'rest_framework/utils')
-rw-r--r--rest_framework/utils/representation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rest_framework/utils/representation.py b/rest_framework/utils/representation.py
index 3f17a8b9..0fdb4775 100644
--- a/rest_framework/utils/representation.py
+++ b/rest_framework/utils/representation.py
@@ -2,6 +2,7 @@
Helper functions for creating user-friendly representations
of serializer classes and serializer fields.
"""
+from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import force_text
from django.utils.functional import Promise
@@ -24,7 +25,7 @@ def smart_repr(value):
if isinstance(value, Promise) and value._delegate_text:
value = force_text(value)
- value = repr(value)
+ value = repr(value).decode('utf-8')
# Representations like u'help text'
# should simply be presented as 'help text'