Ticket #2304: 2304.diff
File 2304.diff, 850 bytes (added by , 17 years ago) |
---|
-
django/db/transaction.py
82 82 Sets a dirty flag for the current thread and code streak. This can be used 83 83 to decide in a managed block of code to decide whether there are open 84 84 changes waiting for commit. 85 86 DISABLE_TRANSACTION_MANAGEMENT puts the developer in control 87 of the Unit of Work. This will ignore the framework of the changes and allow 88 the developer to make the determination of when to commit and rollback as well 89 as assume the responsibility. 85 90 """ 91 if (settings.DISABLE_TRANSACTION_MANAGEMENT): 92 return 93 86 94 thread_ident = thread.get_ident() 87 95 if thread_ident in dirty: 88 96 dirty[thread_ident] = True