def commit_on_success(using=None, read_committed=False):
 if callable(using):
  return CommitOnSuccessManager(DEFAULT_DB_ALIAS, read_committed)(using)
 else:
  return CommitOnSuccessManager(using, read_committed)

def commit_on_success ( using = None , read_committed = False ) : if callable ( using ) : return CommitOnSuccessManager ( DEFAULT_DB_ALIAS , read_committed ) ( using ) else : return CommitOnSuccessManager ( using , read_committed )
this decorator activates commit on response .