diff options
| author | Tom Christie | 2014-12-15 09:20:27 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-15 09:20:27 +0000 | 
| commit | 8934e61b67e4aed38b04f2fe18f011ecbf9010cb (patch) | |
| tree | 479517fbfb5b9fa8c989c28ecc5f4f0ef4ec47d0 /rest_framework/utils/representation.py | |
| parent | d232c5739e13da1c3e0461c79e9e124f576f1c05 (diff) | |
| parent | d22c0007b3ec9e4d7105afc4f7a2cb9a89c0f97b (diff) | |
| download | django-rest-framework-8934e61b67e4aed38b04f2fe18f011ecbf9010cb.tar.bz2 | |
Merge branch 'jpadilla-exception-handler-context' into version-3.1
Diffstat (limited to 'rest_framework/utils/representation.py')
| -rw-r--r-- | rest_framework/utils/representation.py | 3 | 
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' | 
