summaryrefslogtreecommitdiff
path: root/django/utils/functional.py
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-05-19 12:27:17 +0200
committerAndrew Godwin <andrew@aeracode.org>2013-05-19 12:27:17 +0200
commitd58c98d73c41b97e9543f88d3a81ffa6f23e4c7d (patch)
tree4c7f1681595835b248a2ea45040100c50603cdca /django/utils/functional.py
parent38a8cf1cdccb937297c7735aa73f6c02d468e7df (diff)
Fix proxy objects to respect !=
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 1592828c7f..cab74886d3 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -147,6 +147,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()