summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-12-24 23:24:23 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-12-29 21:59:07 +0100
commit5d5e1f5afa4b2c0b0a0ead37741ef7778187a48c (patch)
treef3fca6854ff39e55947441518be5dcefaf5fd47b /django
parent641acf76e706dcff0932b0825f1acbde715cc2c4 (diff)
Removed support is_safe and needs_autoescape as function attributes.
Diffstat (limited to 'django')
-rw-r--r--django/template/defaultfilters.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index dac4e5ddb4..85202b62a4 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -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)