@@ -1548,15 +1548,19 @@ depending on state from the current transaction*:
1548
1548
transaction.commit()
1549
1549
expand_abbreviations.delay(article.pk)
1550
1550
1551
- Note that Django 1.6 and later enable autocommit mode by default
1552
- (deprecating `commit_on_success` and `commit_manually` ), automatically
1553
- wrapping each SQL query in its own transaction, avoiding the race
1554
- condition by default and making it less likely that you' ll encounter
1555
- the above problem. However, enabling `ATOMIC_REQUESTS ` on the database
1556
- connection will bring back the transaction per request model and the
1557
- race condition along with it. In this case, the simplest solution is
1558
- just to use the `@ transaction.non_atomic_requests` to switch it back
1559
- to autocommit for that view.
1551
+ .. note::
1552
+ Django 1.6 (and later) now enables autocommit mode by default,
1553
+ and `` commit_on_success`` / `` commit_manually`` are depreacated.
1554
+
1555
+ This means each SQL query is wrapped and executed in individual
1556
+ transactions, making it less likely to experience the
1557
+ problem described above.
1558
+
1559
+ However, enabling `` ATOMIC_REQUESTS `` on the database
1560
+ connection will bring back the transaction- per- request model and the
1561
+ race condition along with it. In this case, the simple solution is
1562
+ using the `` @ transaction.non_atomic_requests`` decorator to go back
1563
+ to autocommit for that view only.
1560
1564
1561
1565
.. _task- example:
1562
1566
0 commit comments