def restructuredtext(value):
    try:
        from docutils.core import publish_parts
    except __HOLE__:
        if settings.DEBUG:
            raise template.TemplateSyntaxError, "Error in {% restructuredtext %} filter: The Python docutils library isn't installed."
        return value
    else:
        docutils_settings = getattr(settings, "RESTRUCTUREDTEXT_FILTER_SETTINGS", {})
        parts = publish_parts(source=value, writer_name="html4css1", settings_overrides=docutils_settings)
        return parts["fragment"]
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-0.96/django/contrib/markup/templatetags/markup.py/restructuredtext