aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/exceptions.py
diff options
context:
space:
mode:
authorTom Christie2014-12-18 11:21:25 +0000
committerTom Christie2014-12-18 11:21:25 +0000
commitc8d88c8c8a594e3b66547a34462db4766292ea9e (patch)
tree09d1e53c9c019501b85ff8892dca4177c95a6e0b /rest_framework/exceptions.py
parent47fe6977077ae33dfe2f8b6d04d81083b9b9f4d7 (diff)
parentd8803a35bd2dc8cbf4c892f68b48c72f24e83916 (diff)
downloaddjango-rest-framework-c8d88c8c8a594e3b66547a34462db4766292ea9e.tar.bz2
Merge branch 'master' into version-3.1
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 238934db..bcfd8961 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):