Skip to content

Commit

Permalink
Extended docs for Q() objects mentioning the ~ (NOT) operator.
Browse files Browse the repository at this point in the history
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
  • Loading branch information
mokazemi and sarahboyce committed Apr 15, 2024
1 parent 2bcf555 commit 47c6082
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/ref/models/querysets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4078,9 +4078,10 @@ elsewhere.
A ``Q()`` object represents an SQL condition that can be used in
database-related operations. It's similar to how an
: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
combine them using operators such as ``|`` (``OR``), ``&`` (``AND``), and ``^``
(``XOR``). See :ref:`complex-lookups-with-q`.
or annotation. They make it possible to define and reuse conditions. These can
be negated using the ``~`` (``NOT``) operator, and combined using operators
such as ``|`` (``OR``), ``&`` (``AND``), and ``^`` (``XOR``). See
:ref:`complex-lookups-with-q`.

``Prefetch()`` objects
----------------------
Expand Down

0 comments on commit 47c6082

Please sign in to comment.