mirror of
https://github.com/django/django.git
synced 2025-03-13 19:00:45 +00:00
Extended docs for Q() objects mentioning the ~ (NOT) operator.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
This commit is contained in:
parent
2bcf555763
commit
47c608202a
@ -4078,9 +4078,10 @@ elsewhere.
|
|||||||
A ``Q()`` object represents an SQL condition that can be used in
|
A ``Q()`` object represents an SQL condition that can be used in
|
||||||
database-related operations. It's similar to how an
|
database-related operations. It's similar to how an
|
||||||
:class:`F() <django.db.models.F>` object represents the value of a model field
|
:class:`F() <django.db.models.F>` object represents the value of a model field
|
||||||
or annotation. They make it possible to define and reuse conditions, and
|
or annotation. They make it possible to define and reuse conditions. These can
|
||||||
combine them using operators such as ``|`` (``OR``), ``&`` (``AND``), and ``^``
|
be negated using the ``~`` (``NOT``) operator, and combined using operators
|
||||||
(``XOR``). See :ref:`complex-lookups-with-q`.
|
such as ``|`` (``OR``), ``&`` (``AND``), and ``^`` (``XOR``). See
|
||||||
|
:ref:`complex-lookups-with-q`.
|
||||||
|
|
||||||
``Prefetch()`` objects
|
``Prefetch()`` objects
|
||||||
----------------------
|
----------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user