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 force_unicode(value)
    else:
        docutils_settings = getattr(settings, "RESTRUCTUREDTEXT_FILTER_SETTINGS", {})
        parts = publish_parts(source=smart_str(value), writer_name="html4css1", settings_overrides=docutils_settings)
        return mark_safe(force_unicode(parts["fragment"]))
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/markup/templatetags/markup.py/restructuredtext