select_for_update in development Django
The Django documentation states that: If you were relying on “automatic transactions” to provide locking between select_for_update() and a subsequent write operation — an extremely fragile design, but nonetheless possible — you must wrap the relevant code in atomic(). Is the reason why this no longer works is that autocommit is done at the database layer and not the application layer? Previously the transaction would be held open until a data-altering function is called : Django’s default behavior is to run with an open transaction which it commits automatically when any built-in, data