If I have a view function that transfers money from savings to
checking account, is @transaction.commit_on_success the recommend way
to manage the transaction?

So something like:

@transaction.commit_on_success
def transfer(request):
    ...
    savings.withdraw(amount)
    checking.deposit(amount)


If I use @transaction.commit_on_success, do I still need
django.middleware.transaction.TransactionMiddleware?

And all other database interactions will remain auto-commit, correct?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to