mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Fixed #26118 -- Added 'is' operator to if template tag.
This commit is contained in:
committed by
Tim Graham
parent
a08d2463d2
commit
c00ae7f58c
@@ -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)),
|
||||
|
||||
Reference in New Issue
Block a user