summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authoranabelensc <belensarabia@gmail.com>2015-12-14 19:13:21 +0000
committerTim Graham <timograham@gmail.com>2017-01-03 14:15:46 -0500
commit1c12df4aa6c599959d9eb6de2076bf8aa6e301d6 (patch)
treee1101dd29aa196f69ba2542b6a3ef72c75741446 /docs
parentf0ef0c49e9284f262fbc63e8a497699ca4a248fe (diff)
Fixed #25912 -- Added binary left/right shift operators to F expressions.
Thanks Mariusz Felisiak for review and MySQL advice.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/1.11.txt3
-rw-r--r--docs/topics/db/queries.txt8
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt
index 9593a5c658..abdfb08a27 100644
--- a/docs/releases/1.11.txt
+++ b/docs/releases/1.11.txt
@@ -367,6 +367,9 @@ Models
:meth:`~django.db.models.Expression.desc` to control
the ordering of null values.
+* The new ``F`` expression ``bitleftshift()`` and ``bitrightshift()`` methods
+ allow :ref:`bitwise shift operations <using-f-expressions-in-filters>`.
+
Requests and Responses
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/topics/db/queries.txt b/docs/topics/db/queries.txt
index 0d69099fa7..f1540cbb96 100644
--- a/docs/topics/db/queries.txt
+++ b/docs/topics/db/queries.txt
@@ -652,11 +652,15 @@ that were modified more than 3 days after they were published::
>>> from datetime import timedelta
>>> Entry.objects.filter(mod_date__gt=F('pub_date') + timedelta(days=3))
-The ``F()`` objects support bitwise operations by ``.bitand()`` and
-``.bitor()``, for example::
+The ``F()`` objects support bitwise operations by ``.bitand()``, ``.bitor()``,
+``.bitrightshift()``, and ``.bitleftshift()``. For example::
>>> F('somefield').bitand(16)
+.. versionchanged:: 1.11
+
+ Support for ``.bitrightshift()`` and ``.bitleftshift()`` was added.
+
The ``pk`` lookup shortcut
--------------------------