Transactions are working correctly in production environment (django 1.9 + Ubuntu + PosgreSQL) but they have no effect in development environment with DEBUG = True.
E.g.
with transaction.atomic()
do_stuff()
raise Exception()
Changes made to DB by do_stuff() are supposed to be rolled back because of the exception. This happens in production environment as expected.
In dev environment changes made by do_stuff are not rolled back. I can't find any explanation of this behaviour in django docs.
Why is this happening?