@@ -399,10 +399,10 @@ is less than or equal to ``50``:
399399Combine 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
403403sets of matching criteria. To create a ``Q`` object, pass your query
404404filter 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
408408shows the syntax for passing multiple ``Q`` objects to the ``filter()``
@@ -791,27 +791,17 @@ The ``Movie`` model, which represents the ``sample_mflix.movies`` collection,
791791uses the ``id`` field as its primary key. The following example constructs
792792the 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
809800Additional 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
816806To learn how to perform other ``QuerySet`` operations, see the
817807:ref:`django-crud` guide.
0 commit comments