2009/6/26 sico <allensi...@gmail.com>:
>
> Hi
>

Hi

> Is it possible to rollback the transaction without raising an
> exception when the transactions are tied to http requests??

What do you mean ?
You use raw sql in  a view ?


> I'm writing several records in one post call, if any fail I'd like to
> rollback the transaction but return a nice error message to the user.
> Surely I'm missing something as this seems quite a simple
> requirement...

AFAIK, django automatically rollbacks your transaction when you use
its orm (and surely raises an exception).
If you use raw sql you can surely use try ... except around the Python
DB API call

>
> thanks in advance....
> Simon


Frédéric

> >
>



-- 
http://www.openidfrance.fr/fhebert

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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