mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Improved wording in Q() docs.
This commit is contained in:
parent
1c2c6f1b51
commit
83c631ade7
@ -3567,14 +3567,12 @@ elsewhere.
|
|||||||
|
|
||||||
.. class:: Q
|
.. class:: Q
|
||||||
|
|
||||||
A ``Q()`` object, like an :class:`~django.db.models.F` object, encapsulates a
|
A ``Q()`` object represents an SQL condition that can be used in
|
||||||
SQL expression in a Python object that can be used in database-related
|
database-related operations. It's similar to how an
|
||||||
operations.
|
: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
|
||||||
In general, ``Q() objects`` make it possible to define and reuse conditions.
|
combine them using operators such as ``|`` (``OR``) and ``&`` (``AND``). See
|
||||||
This permits the :ref:`construction of complex database queries
|
:ref:`complex-lookups-with-q`.
|
||||||
<complex-lookups-with-q>` using ``|`` (``OR``) and ``&`` (``AND``) operators;
|
|
||||||
in particular, it is not otherwise possible to use ``OR`` in ``QuerySets``.
|
|
||||||
|
|
||||||
``Prefetch()`` objects
|
``Prefetch()`` objects
|
||||||
----------------------
|
----------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user