aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework
diff options
context:
space:
mode:
authoryetist2012-07-27 11:39:24 +0800
committeryetist2012-07-27 11:39:24 +0800
commit2deb31d0968c77f40c63e0ffb9f655e69fbe1d96 (patch)
tree0d8612ea1a7771bca359b206c92866376ac4d13c /djangorestframework
parentb1fca03089722e96ffb3e8fa3da356d85d528d95 (diff)
downloaddjango-rest-framework-2deb31d0968c77f40c63e0ffb9f655e69fbe1d96.tar.bz2
support utf8 description
Diffstat (limited to 'djangorestframework')
-rw-r--r--djangorestframework/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py
index 3657fd64..4aa6ca0c 100644
--- a/djangorestframework/views.py
+++ b/djangorestframework/views.py
@@ -156,6 +156,9 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
description = _remove_leading_indent(description)
+ if not isinstance(description, unicode):
+ description = description.decode('UTF-8')
+
if html:
return self.markup_description(description)
return description