diff options
| author | yetist | 2012-07-27 11:39:24 +0800 |
|---|---|---|
| committer | yetist | 2012-07-27 11:39:24 +0800 |
| commit | 2deb31d0968c77f40c63e0ffb9f655e69fbe1d96 (patch) | |
| tree | 0d8612ea1a7771bca359b206c92866376ac4d13c /djangorestframework | |
| parent | b1fca03089722e96ffb3e8fa3da356d85d528d95 (diff) | |
| download | django-rest-framework-2deb31d0968c77f40c63e0ffb9f655e69fbe1d96.tar.bz2 | |
support utf8 description
Diffstat (limited to 'djangorestframework')
| -rw-r--r-- | djangorestframework/views.py | 3 |
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 |
