Ticket #8971: 8971-reverse.patch
File 8971-reverse.patch, 1.1 KB (added by , 16 years ago) |
---|
-
django/contrib/admindocs/utils.py
4 4 from email.Parser import HeaderParser 5 5 from email.Errors import HeaderParseError 6 6 from django.utils.safestring import mark_safe 7 from django.core.urlresolvers import reverse 7 8 try: 8 9 import docutils.core 9 10 import docutils.nodes … … 52 53 body = "\n\n".join(parts[1:]) 53 54 return title, body, metadata 54 55 55 def parse_rst(text, default_reference_context, thing_being_parsed=None , link_base='../..'):56 def parse_rst(text, default_reference_context, thing_being_parsed=None): 56 57 """ 57 58 Convert the string from reST to an XHTML fragment. 58 59 """ … … 60 61 'doctitle_xform' : True, 61 62 'inital_header_level' : 3, 62 63 "default_reference_context" : default_reference_context, 63 "link_base" : link_base,64 "link_base" : reverse('django-admindocs-docroot').rstrip('/') 64 65 } 65 66 if thing_being_parsed: 66 67 thing_being_parsed = "<%s>" % thing_being_parsed