summaryrefslogtreecommitdiff
path: root/django/utils/functional.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/functional.py')
-rw-r--r--django/utils/functional.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 93befcf59e..0606c775ef 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -148,6 +148,11 @@ def lazy(func, *resultclasses):
else:
return func(*self.__args, **self.__kw)
+ def __ne__(self, other):
+ if isinstance(other, Promise):
+ other = other.__cast()
+ return self.__cast() != other
+
def __eq__(self, other):
if isinstance(other, Promise):
other = other.__cast()