summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorPreston Timmons <preston.timmons@rewardstyle.com>2016-01-21 21:50:06 -0600
committerTim Graham <timograham@gmail.com>2016-01-22 15:35:28 -0500
commitc00ae7f58c34962ed6dbec4eb8aaf747da59ed2f (patch)
treeb3985f7262b60ff43ca6f0e7bc4c84b2d25a915e /django
parenta08d2463d2674b95f5a995f77cd9596168378a4f (diff)
Fixed #26118 -- Added 'is' operator to if template tag.
Diffstat (limited to 'django')
-rw-r--r--django/template/smartif.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/template/smartif.py b/django/template/smartif.py
index a3c1f37973..1433a8499a 100644
--- a/django/template/smartif.py
+++ b/django/template/smartif.py
@@ -98,6 +98,7 @@ 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)),
+ 'is': infix(10, lambda context, x, y: x.eval(context) is 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)),