summaryrefslogtreecommitdiff
path: root/docs/topics
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2013-03-11 15:10:58 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2013-03-11 15:10:58 +0100
commite654180ce2a11ef4c525497d6c40dc542e16806c (patch)
tree7658f47dfaafe0dd09fe62fd5525e8f6e6a41ba7 /docs/topics
parentf32100939e8ea8a2714e45e22467af5df55c8f33 (diff)
Improved the API of set_autocommit.
Diffstat (limited to 'docs/topics')
-rw-r--r--docs/topics/db/transactions.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/topics/db/transactions.txt b/docs/topics/db/transactions.txt
index b8fc0d4efa..b8017e8bfa 100644
--- a/docs/topics/db/transactions.txt
+++ b/docs/topics/db/transactions.txt
@@ -255,7 +255,7 @@ database connection, if you need to.
.. function:: get_autocommit(using=None)
-.. function:: set_autocommit(using=None, autocommit=True)
+.. function:: set_autocommit(autocommit, using=None)
These functions take a ``using`` argument which should be the name of a
database. If it isn't provided, Django uses the ``"default"`` database.
@@ -600,11 +600,11 @@ To disable autocommit temporarily, instead of::
you should now use::
- transaction.set_autocommit(autocommit=False)
+ transaction.set_autocommit(False)
try:
# do stuff
finally:
- transaction.set_autocommit(autocommit=True)
+ transaction.set_autocommit(True)
To enable autocommit temporarily, instead of::
@@ -613,11 +613,11 @@ To enable autocommit temporarily, instead of::
you should now use::
- transaction.set_autocommit(autocommit=True)
+ transaction.set_autocommit(True)
try:
# do stuff
finally:
- transaction.set_autocommit(autocommit=False)
+ transaction.set_autocommit(False)
Disabling transaction management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~