diff options
Diffstat (limited to 'django/db/models')
| -rw-r--r-- | django/db/models/expressions.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/db/models/expressions.py b/django/db/models/expressions.py index 84960d77e1..4753a258f9 100644 --- a/django/db/models/expressions.py +++ b/django/db/models/expressions.py @@ -51,6 +51,7 @@ class Combinable: BITOR = '|' BITLEFTSHIFT = '<<' BITRIGHTSHIFT = '>>' + BITXOR = '#' def _combine(self, other, connector, reversed): if not hasattr(other, 'resolve_expression'): @@ -105,6 +106,9 @@ class Combinable: def bitrightshift(self, other): return self._combine(other, self.BITRIGHTSHIFT, False) + def bitxor(self, other): + return self._combine(other, self.BITXOR, False) + def __or__(self, other): if getattr(self, 'conditional', False) and getattr(other, 'conditional', False): return Q(self) | Q(other) |
