def escape_filter(value):
"""
Marks the value as a string that should be auto-escaped.
"""
return mark_for_escaping(value)
python类mark_for_escaping()的实例源码
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)
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)
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.
"""
return mark_for_escaping(value)
def escape_filter(value):
"""
Marks the value as a string that should be auto-escaped.
"""
return mark_for_escaping(value)