aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/exceptions.py
diff options
context:
space:
mode:
authorTom Christie2014-12-17 13:39:35 +0000
committerTom Christie2014-12-17 13:39:35 +0000
commit426547c61c725ca7dc47671c084d1a2805c92305 (patch)
tree65550e4ebb8cd3eed285e4ad821f3f1eae23d2c8 /rest_framework/exceptions.py
parent65fc0d0f77c8882481ef37a68294f98879d3f8d5 (diff)
downloaddjango-rest-framework-426547c61c725ca7dc47671c084d1a2805c92305.tar.bz2
str() -> six.text_type(). Closes #2290.
Diffstat (limited to 'rest_framework/exceptions.py')
-rw-r--r--rest_framework/exceptions.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/exceptions.py b/rest_framework/exceptions.py
index be41d08d..1f381e4e 100644
--- a/rest_framework/exceptions.py
+++ b/rest_framework/exceptions.py
@@ -5,8 +5,8 @@ In addition Django's built in 403 and 404 exceptions are handled.
(`django.http.Http404` and `django.core.exceptions.PermissionDenied`)
"""
from __future__ import unicode_literals
+from django.utils import six
from django.utils.encoding import force_text
-
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from rest_framework import status
@@ -66,7 +66,7 @@ class ValidationError(APIException):
self.detail = _force_text_recursive(detail)
def __str__(self):
- return str(self.detail)
+ return six.text_type(self.detail)
class ParseError(APIException):