Author: jezdez
Date: 2010-05-10 06:20:36 -0500 (Mon, 10 May 2010)
New Revision: 13192
Modified:
django/trunk/django/contrib/admindocs/utils.py
Log:
Fixed #12892 - Fixed unicode related bug in a utility function of the admindocs
app that prevented it to be used in non-English environments together with
certain versions of docutils.
Modified: django/trunk/django/contrib/admindocs/utils.py
===================================================================
--- django/trunk/django/contrib/admindocs/utils.py 2010-05-10 11:20:17 UTC
(rev 13191)
+++ django/trunk/django/contrib/admindocs/utils.py 2010-05-10 11:20:36 UTC
(rev 13192)
@@ -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 @@
"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)
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.