support utf8 description

This commit is contained in:
yetist 2012-07-27 11:39:24 +08:00
parent b1fca03089
commit 2deb31d096

View File

@ -156,6 +156,9 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
description = _remove_leading_indent(description) description = _remove_leading_indent(description)
if not isinstance(description, unicode):
description = description.decode('UTF-8')
if html: if html:
return self.markup_description(description) return self.markup_description(description)
return description return description