def commit_on_success(using=None):
    def entering(using):
        enter_transaction_management(using=using)
        managed(True, using=using)

    def exiting(exc_value, using):
        try:
            if exc_value is not None:
                if is_dirty(using=using):
                    rollback(using=using)
            else:
                if is_dirty(using=using):
                    try:
                        commit(using=using)
                    except:
                        rollback(using=using)
                        raise
        finally:
            leave_transaction_management(using=using)

    return _transaction_func(entering, exiting, using)
This decorator activates commit on response. This way, if the view function
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/transaction.py/commit_on_success