restructuredtext filter now passes settings from {{{RESTRUCTUREDTEXT_FILTER_SETTINGS}}} into docutils. See http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer for what these settings are.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2006-06-30 20:19:05 +00:00
parent 2673aa366a
commit 0ad8863692
1 changed files with 2 additions and 1 deletions

View File

@ -47,7 +47,8 @@ def restructuredtext(value):
raise template.TemplateSyntaxError, "Error in {% restructuredtext %} filter: The Python docutils library isn't installed."
return value
else:
parts = publish_parts(source=value, writer_name="html4css1")
docutils_settings = getattr(settings, "RESTRUCTUREDTEXT_FILTER_SETTINGS", {})
parts = publish_parts(source=value, writer_name="html4css1", settings_overrides=docutils_settings)
return parts["fragment"]
register.filter(textile)