diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.11.txt | 3 | ||||
| -rw-r--r-- | docs/topics/db/queries.txt | 8 |
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 -------------------------- |
