Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.1.X] Fixed #12892 - Fixed unicode related bug in a utility functio…

…n of the admindocs app that prevented it to be used in non-English environments together with certain versions of docutils.

Backport from trunk, r13192

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 8099fec855ca96728e8b90338619397851dfdd7d 1 parent 868cf80
@jezdez jezdez authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/contrib/admindocs/utils.py
View
3  django/contrib/admindocs/utils.py
@@ -5,6 +5,7 @@
from email.Errors import HeaderParseError
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
+from django.utils.encoding import smart_str
try:
import docutils.core
import docutils.nodes
@@ -64,7 +65,7 @@ def parse_rst(text, default_reference_context, thing_being_parsed=None):
"link_base" : reverse('django-admindocs-docroot').rstrip('/')
}
if thing_being_parsed:
- thing_being_parsed = "<%s>" % thing_being_parsed
+ thing_being_parsed = smart_str("<%s>" % thing_being_parsed)
parts = docutils.core.publish_parts(text, source_path=thing_being_parsed,
destination_path=None, writer_name='html',
settings_overrides=overrides)
Please sign in to comment.
Something went wrong with that request. Please try again.