Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[1.5.X] Fixed #19154 - Noted commit_manually requires commit/rollback…

… for reads

Thanks als for the report.

Backport of 620e0bb from master
  • Loading branch information...
1 parent e645c89 commit 84e33545c90f353eacf8d01b33d9bec635f4e2c0 @timgraham timgraham committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 docs/topics/db/transactions.txt
8 docs/topics/db/transactions.txt
@@ -161,8 +161,12 @@ managers, too.
transactions. It tells Django you'll be managing the transaction on your
- If your view changes data and doesn't ``commit()`` or ``rollback()``,
- Django will raise a ``TransactionManagementError`` exception.
+ Whether you are writing or simply reading from the database, you must
+ ``commit()`` or ``rollback()`` explicitly or Django will raise a
+ :exc:`TransactionManagementError` exception. This is required when reading
+ from the database because ``SELECT`` statements may call functions which
+ modify tables, and thus it is impossible to know if any data has been
+ modified.
Manual transaction management looks like this::

0 comments on commit 84e3354

Please sign in to comment.
Something went wrong with that request. Please try again.