File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ MongoDB data.
3838- :ref:`django-raw-queries`: Learn how to use MongoDB's aggregation pipeline syntax
3939 or the PyMongo driver to query your data.
4040
41- - :ref:`django-transactions`: Learn how to use {+framework+}'s transactions API
41+ - :ref:`django-transactions`: Learn how to use {+framework+}'s transaction API
4242 to run data operations within a transaction.
Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ Examples
8686~~~~~~~~
8787
8888The following example calls the ``create()`` method within a transaction,
89- inserting a document into the ``sample_mflix.movies`` collection:
89+ inserting a document into the ``sample_mflix.movies`` collection if the
90+ transaction succeeds:
9091
9192.. literalinclude:: /includes/interact-data/transactions.py
9293 :start-after: start-transaction-decorator
@@ -96,7 +97,7 @@ inserting a document into the ``sample_mflix.movies`` collection:
9697
9798Alternatively, you can use the ``transaction.atomic()`` context manager
9899to create an atomic block. This example runs the same operation as the
99- previous example but uses a context manager to start a transaction:
100+ preceding example but uses a context manager to start a transaction:
100101
101102.. literalinclude:: /includes/interact-data/transactions.py
102103 :start-after: start-transaction-manager
You can’t perform that action at this time.
0 commit comments