Module Expr Str ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str Pass decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body FunctionDef arguments args defaults vararg kwarg body With NameLoad body Return Call NameLoad NameLoad NameLoad decorator_list Call NameLoad NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If Call NameLoad NameLoad body Return Call Call NameLoad NameLoad NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad keyword NameLoad decorator_list Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call NameLoad keyword NameLoad Expr Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryFinally body If CompareIsNot NameLoad NameLoad body If Call NameLoad keyword NameLoad body Expr Call NameLoad keyword NameLoad orelse If Call NameLoad keyword NameLoad body TryExcept body Expr Call NameLoad keyword NameLoad handlers ExceptHandler body Expr Call NameLoad keyword NameLoad Raise finalbody Expr Call NameLoad keyword NameLoad decorator_list Return Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call NameLoad keyword NameLoad Expr Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call NameLoad keyword NameLoad decorator_list Return Call NameLoad NameLoad NameLoad NameLoad decorator_list
N/A N/A 
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.

The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (actually it's more like
commit-on-change). As soon as the .save() or .delete() (or related) methods are
called, a commit is made.

Managed transactions don't do those commits, but will need some kind of manual
or implicit commits or rollbacks.
 functools wraps django.db connections DEFAULT_DB_ALIAS TransactionManagementError N/A Exception N/A N/A 
    This exception is thrown when something bad happens with transaction
    management.
     N/A N/A abort N/A N/A using N/A None N/A N/A 
    Roll back any ongoing transactions and clean the transaction management
    state of the connection.

    This method is to be used only in cases where using balanced
    leave_transaction_management() calls isn't possible. For example after a
    request has finished, the transaction state isn't known, yet the connection
    must be cleaned up for the next request.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection abort N/A enter_transaction_management N/A N/A managed using N/A True None N/A N/A 
    Enters transaction management for a running thread. It must be balanced with
    the appropriate leave_transaction_management call, since the actual state is
    managed as a stack.

    The state and dirty flag are carried over from the surrounding block or
    from the settings, if there is no surrounding block (dirty is always false
    when no current block is running).
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection enter_transaction_management managed N/A leave_transaction_management N/A N/A using N/A None N/A N/A 
    Leaves transaction management for a running thread. A dirty flag is carried
    over to the surrounding block, as a commit will commit all changes, even
    those from outside. (Commits are on connection level.)
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection leave_transaction_management N/A is_dirty N/A N/A using N/A None N/A N/A 
    Returns True if the current transaction requires a commit for changes to
    happen.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection is_dirty N/A set_dirty N/A N/A using N/A None N/A N/A 
    Sets a dirty flag for the current thread and code streak. This can be used
    to decide in a managed block of code to decide whether there are open
    changes waiting for commit.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection set_dirty N/A set_clean N/A N/A using N/A None N/A N/A 
    Resets a dirty flag for the current thread and code streak. This can be used
    to decide in a managed block of code to decide whether a commit or rollback
    should happen.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection set_clean N/A clean_savepoints N/A N/A using N/A None N/A N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection clean_savepoints N/A is_managed N/A N/A using N/A None N/A N/A 
    Checks whether the transaction manager is in manual or in auto state.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection is_managed N/A managed N/A N/A flag using N/A True None N/A N/A 
    Puts the transaction manager into a manual state: managed transactions have
    to be committed explicitly by the user. If you switch off transaction
    management and there is a pending commit/rollback, the data will be
    commited.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection managed flag N/A commit_unless_managed N/A N/A using N/A None N/A N/A 
    Commits changes if the system is not in managed transaction mode.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection commit_unless_managed N/A rollback_unless_managed N/A N/A using N/A None N/A N/A 
    Rolls back changes if the system is not in managed transaction mode.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection rollback_unless_managed N/A commit N/A N/A using N/A None N/A N/A 
    Does the commit itself and resets the dirty flag.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection commit N/A rollback N/A N/A using N/A None N/A N/A 
    This function does the rollback itself and resets the dirty flag.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection rollback N/A savepoint N/A N/A using N/A None N/A N/A 
    Creates a savepoint (if supported and required by the backend) inside the
    current transaction. Returns an identifier for the savepoint that will be
    used for the subsequent rollback or commit.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection savepoint N/A savepoint_rollback N/A N/A sid using N/A None N/A N/A 
    Rolls back the most recent savepoint (if one exists). Does nothing if
    savepoints are not supported.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection savepoint_rollback sid N/A savepoint_commit N/A N/A sid using N/A None N/A N/A 
    Commits the most recent savepoint (if one exists). Does nothing if
    savepoints are not supported.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A connection N/A connections N/A using N/A N/A N/A connection savepoint_commit sid N/A Transaction N/A object N/A N/A 
    Acts as either a decorator, or a context manager.  If it's a decorator it
    takes a function and returns a wrapped function.  If it's a contextmanager
    it's used with the ``with`` statement.  In either event entering/exiting
    are called before and after, respectively, the function/block is executed.

    autocommit, commit_on_success, and commit_manually contain the
    implementations of entering and exiting.
     __init__ N/A N/A self entering exiting using N/A N/A N/A N/A self entering entering N/A N/A self exiting exiting N/A N/A self using using N/A __enter__ N/A N/A self N/A N/A N/A N/A N/A self entering N/A self using N/A __exit__ N/A N/A self exc_type exc_value traceback N/A N/A N/A N/A N/A self exiting exc_value N/A self using N/A __call__ N/A N/A self func N/A N/A inner N/A N/A N/A args kwargs N/A N/A self N/A N/A N/A func args kwargs N/A N/A wraps func N/A inner N/A N/A _transaction_func N/A N/A entering exiting using N/A N/A N/A 
    Takes 3 things, an entering function (what to do to start this block of
    transaction management), an exiting function (what to do to end it, on both
    success and failure, and using which can be: None, indiciating using is
    DEFAULT_DB_ALIAS, a callable, indicating that using is DEFAULT_DB_ALIAS and
    to return the function already wrapped.

    Returns either a Transaction objects, which is both a decorator and a
    context manager, or a wrapped function, if using is a callable.
     N/A N/A using None N/A N/A using DEFAULT_DB_ALIAS N/A N/A callable using N/A N/A N/A N/A Transaction entering exiting DEFAULT_DB_ALIAS using N/A N/A Transaction entering exiting using N/A autocommit N/A N/A using N/A None N/A N/A 
    Decorator that activates commit on save. This is Django's default behavior;
    this decorator is useful if you globally activated transaction management in
    your settings file and want the default behavior in some view functions.
     entering N/A N/A using N/A N/A N/A N/A enter_transaction_management managed False using using N/A N/A managed False using using N/A exiting N/A N/A exc_value using N/A N/A N/A N/A leave_transaction_management using using N/A N/A N/A _transaction_func entering exiting using N/A commit_on_success N/A N/A using N/A None N/A N/A 
    This decorator activates commit on response. This way, if the view function
    runs successfully, a commit is made; if the viewfunc produces an exception,
    a rollback is made. This is one of the most common ways to do transaction
    control in Web apps.
     entering N/A N/A using N/A N/A N/A N/A enter_transaction_management using using N/A N/A managed True using using N/A exiting N/A N/A exc_value using N/A N/A N/A N/A N/A N/A exc_value None N/A N/A N/A is_dirty using using N/A N/A N/A rollback using using N/A N/A N/A is_dirty using using N/A N/A N/A N/A N/A commit using using N/A N/A N/A N/A N/A rollback using using N/A N/A N/A N/A leave_transaction_management using using N/A N/A N/A _transaction_func entering exiting using N/A commit_manually N/A N/A using N/A None N/A N/A 
    Decorator that activates manual transaction control. It just disables
    automatic transaction control and doesn't do any commit/rollback of its
    own -- it's up to the user to call the commit and rollback functions
    themselves.
     entering N/A N/A using N/A N/A N/A N/A enter_transaction_management using using N/A N/A managed True using using N/A exiting N/A N/A exc_value using N/A N/A N/A N/A leave_transaction_management using using N/A N/A N/A _transaction_func entering exiting using N/A