Skip to content

Commit 0c4d8ed

Browse files
committed
wording
1 parent eae953b commit 0c4d8ed

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

source/interact-data/specify-a-query.txt

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,10 @@ is less than or equal to ``50``:
399399
Combine Lookups
400400
~~~~~~~~~~~~~~~
401401

402-
You can use ``Q`` objects to create query filters with multiple
402+
You can use ``Q`` objects to run queries with multiple
403403
sets of matching criteria. To create a ``Q`` object, pass your query
404404
filter to the ``Q()`` method. You can pass multiple ``Q`` objects as
405-
arguments to your query method and separate each Q object by an OR
405+
arguments to your query method and separate each ``Q`` object by an OR
406406
(``|``), AND (``&``), or XOR (``^``) operator. You can also negate
407407
``Q`` objects by prefixing them with the ``~`` symbol. The following example
408408
shows the syntax for passing multiple ``Q`` objects to the ``filter()``
@@ -791,27 +791,17 @@ The ``Movie`` model, which represents the ``sample_mflix.movies`` collection,
791791
uses the ``id`` field as its primary key. The following example constructs
792792
the same query as the preceding code:
793793

794-
.. io-code-block::
795-
:copyable:
796-
797-
.. input:: /includes/interact-data/specify-a-query.py
798-
:start-after: start-primary-key-id
799-
:end-before: end-primary-key-id
800-
:language: python
801-
802-
.. output::
803-
:visible: false
804-
805-
// Your ObjectId values might differ
806-
807-
<Movie: Vertigo>
794+
.. literalinclude:: /includes/interact-data/specify-a-query.py
795+
:language: python
796+
:dedent:
797+
:start-after: start-primary-key-id
798+
:end-before: end-primary-key-id
808799

809800
Additional Information
810801
----------------------
811802

812-
To learn how to run raw database queries using MongoDB's aggregation
813-
pipeline syntax, rather than ``QuerySet`` API methods, see the
814-
:ref:`django-raw-queries` guide.
803+
To learn how to run raw database queries by using MongoDB's aggregation
804+
pipeline syntax, see the :ref:`django-raw-queries` guide.
815805

816806
To learn how to perform other ``QuerySet`` operations, see the
817807
:ref:`django-crud` guide.

0 commit comments

Comments
 (0)