Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[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
Jannis Leidel authored May 10, 2010

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/contrib/admindocs/utils.py
3  django/contrib/admindocs/utils.py
@@ -5,6 +5,7 @@
5 5
 from email.Errors import HeaderParseError
6 6
 from django.utils.safestring import mark_safe
7 7
 from django.core.urlresolvers import reverse
  8
+from django.utils.encoding import smart_str
8 9
 try:
9 10
     import docutils.core
10 11
     import docutils.nodes
@@ -64,7 +65,7 @@ def parse_rst(text, default_reference_context, thing_being_parsed=None):
64 65
         "link_base" : reverse('django-admindocs-docroot').rstrip('/')
65 66
     }
66 67
     if thing_being_parsed:
67  
-        thing_being_parsed = "<%s>" % thing_being_parsed
  68
+        thing_being_parsed = smart_str("<%s>" % thing_being_parsed)
68 69
     parts = docutils.core.publish_parts(text, source_path=thing_being_parsed,
69 70
                 destination_path=None, writer_name='html',
70 71
                 settings_overrides=overrides)

0 notes on commit 8099fec

Please sign in to comment.
Something went wrong with that request. Please try again.