On Mar 30, 8:33 am, Tomasz Zieliński
<tomasz.zielin...@pyconsultant.eu> wrote:

> If you take a look at TransactionMiddleware source:
>
> http://code.djangoproject.com/browser/django/tags/releases/1.1.1/djan...
>
> then you'll see that it's just commit_on_success in disguise:
>
> http://code.djangoproject.com/browser/django/tags/releases/1.1.1/djan...

So that means I don't need TransactionMiddleware if I use
@transaction.commit_on_success, right?

>
> Also, you can take a look at my post here, to avoid some transaction-
> related problems in future:
>
> http://stackoverflow.com/questions/2235318/how-do-i-deal-with-this-ra...
>

Thanks.

I assume that calling transaction.commit() after the IntegrityError
exception is to refresh the frozen view. But I'm not sure I understand
why transaction.commit() would do that. Can you elaborate?

Also in your stackoverflow answer you said the default for MySQL is
AUTOCOMMIT=OFF. but in the Django doc (http://docs.djangoproject.com/
en/dev/topics/db/transactions/) it was stated that

"Django's default behavior is to run with an open transaction which it
commits automatically... This is much like the auto-commit setting for
most databases."

So is auto-commit on or off by default?

> --
> Tomasz Zielinskihttp://pyconsultant.eu

-- 
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