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.
38
38
- :ref:`django-raw-queries`: Learn how to use MongoDB's aggregation pipeline syntax
39
39
or the PyMongo driver to query your data.
40
40
41
- - :ref:`django-transactions`: Learn how to use {+framework+}'s transactions API
41
+ - :ref:`django-transactions`: Learn how to use {+framework+}'s transaction API
42
42
to run data operations within a transaction.
Original file line number Diff line number Diff line change @@ -86,7 +86,8 @@ Examples
86
86
~~~~~~~~
87
87
88
88
The 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:
90
91
91
92
.. literalinclude:: /includes/interact-data/transactions.py
92
93
:start-after: start-transaction-decorator
@@ -96,7 +97,7 @@ inserting a document into the ``sample_mflix.movies`` collection:
96
97
97
98
Alternatively, you can use the ``transaction.atomic()`` context manager
98
99
to 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:
100
101
101
102
.. literalinclude:: /includes/interact-data/transactions.py
102
103
:start-after: start-transaction-manager
You can’t perform that action at this time.
0 commit comments