Python django.utils.safestring 模块,mark_for_escaping() 实例源码

我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用django.utils.safestring.mark_for_escaping()

项目:CodingDojo    作者:ComputerSocietyUNB    | 项目源码 | 文件源码
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    return mark_for_escaping(value)
项目:lifesoundtrack    作者:MTG    | 项目源码 | 文件源码
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    with warnings.catch_warnings():
        # Ignore mark_for_escaping deprecation -- this will use
        # conditional_escape() in Django 2.0.
        warnings.simplefilter('ignore', category=RemovedInDjango20Warning)
        return mark_for_escaping(value)
项目:liberator    作者:libscie    | 项目源码 | 文件源码
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    with warnings.catch_warnings():
        # Ignore mark_for_escaping deprecation -- this will use
        # conditional_escape() in Django 2.0.
        warnings.simplefilter('ignore', category=RemovedInDjango20Warning)
        return mark_for_escaping(value)
项目:djanoDoc    作者:JustinChavez    | 项目源码 | 文件源码
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    return mark_for_escaping(value)
项目:django-next-train    作者:bitpixdigital    | 项目源码 | 文件源码
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    return mark_for_escaping(value)
项目:django-wechat-api    作者:crazy-canux    | 项目源码 | 文件源码
def escape_filter(value):
    """
    Marks the value as a string that should be auto-escaped.
    """
    return mark_for_escaping(value)