diff options
| author | Tim Graham <timograham@gmail.com> | 2015-09-05 12:20:05 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:11 -0400 |
| commit | 2ccfac1a651ff35cd243cd272b2202ae1ccd5740 (patch) | |
| tree | d4e47cc4adfd603f3020299f682c698746b1494d /django/template | |
| parent | 9af3c6b9cef974d7d99f1ac4e83f64f09f5d352c (diff) | |
Refs #23913 -- Removed support for a single equals sign in {% if %} tag.
Per deprecation timeline.
Diffstat (limited to 'django/template')
| -rw-r--r-- | django/template/smartif.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/django/template/smartif.py b/django/template/smartif.py index 36c76cb5e6..906350897d 100644 --- a/django/template/smartif.py +++ b/django/template/smartif.py @@ -1,17 +1,13 @@ """ Parser and utilities for the smart 'if' tag """ -import warnings - -from django.utils.deprecation import RemovedInDjango110Warning - - # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) + class TokenBase(object): """ Base class for operators and literals, mainly for debugging and for throwing @@ -102,8 +98,6 @@ OPERATORS = { 'not': prefix(8, lambda context, x: not x.eval(context)), 'in': infix(9, lambda context, x, y: x.eval(context) in y.eval(context)), 'not in': infix(9, lambda context, x, y: x.eval(context) not in y.eval(context)), - # This should be removed in Django 1.10: - '=': infix(10, lambda context, x, y: x.eval(context) == y.eval(context)), '==': infix(10, lambda context, x, y: x.eval(context) == y.eval(context)), '!=': infix(10, lambda context, x, y: x.eval(context) != y.eval(context)), '>': infix(10, lambda context, x, y: x.eval(context) > y.eval(context)), @@ -178,11 +172,6 @@ class IfParser(object): except (KeyError, TypeError): return self.create_var(token) else: - if token == '=': - warnings.warn( - "Operator '=' is deprecated and will be removed in Django 1.10. Use '==' instead.", - RemovedInDjango110Warning, stacklevel=2 - ) return op() def next_token(self): |
