0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

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

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)