summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Kazemi <mokazemi@disroot.org>2024-04-15 19:46:35 +0330
committerNatalia <124304+nessita@users.noreply.github.com>2024-04-15 13:17:35 -0300
commit10efefcb284ce1fca5779be5f1fde90880423064 (patch)
treef47b4ca998014164409bc4dd077e38db02e230a5
parentb6a99b78596a6b82b0298be21a584fb16ffd3d7e (diff)
[5.0.x] Extended docs for Q() objects mentioning the ~ (NOT) operator.
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Backport of 47c608202a58c8120d049c98d5d27c4609551d33 from main.
-rw-r--r--docs/ref/models/querysets.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 6ad76908cb..83fc76ba4a 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -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
----------------------