Ticket #2304: 2304.diff

File 2304.diff, 850 bytes (added by thejaswi_puthraya, 7 years ago)

added the patch wrt r7277

  • django/db/transaction.py

     
    8282    Sets a dirty flag for the current thread and code streak. This can be used
    8383    to decide in a managed block of code to decide whether there are open
    8484    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.
    8590    """
     91    if (settings.DISABLE_TRANSACTION_MANAGEMENT):
     92        return
     93
    8694    thread_ident = thread.get_ident()
    8795    if thread_ident in dirty:
    8896        dirty[thread_ident] = True
Back to Top