mirror of
https://github.com/django/django.git
synced 2025-10-30 17:16:10 +00:00
Removed support is_safe and needs_autoescape as function attributes.
This commit is contained in:
@@ -49,15 +49,6 @@ def stringfilter(func):
|
||||
# when multiple decorators are applied).
|
||||
_dec._decorated_function = getattr(func, '_decorated_function', func)
|
||||
|
||||
for attr in ('is_safe', 'needs_autoescape'):
|
||||
if hasattr(func, attr):
|
||||
import warnings
|
||||
warnings.warn("Setting the %s attribute of a template filter "
|
||||
"function is deprecated; use @register.filter(%s=%s) "
|
||||
"instead" % (attr, attr, getattr(func, attr)),
|
||||
DeprecationWarning)
|
||||
setattr(_dec, attr, getattr(func, attr))
|
||||
|
||||
return wraps(func)(_dec)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user