我们从Python开源项目中,提取了以下6个代码示例,用于说明如何使用django.utils.safestring.mark_for_escaping()。
def escape_filter(value): """ Marks the value as a string that should be auto-escaped. """ return mark_for_escaping(value)
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)