Re: [Zope] Transaction rollback

2006-06-21 Thread Tino Wildenhain

Luiz Fernando B. Ribeiro schrieb:
I need to return an error page with instructions after verifying a 
request but I need to do a rollback. How can I call a full rollback, 
like when using raise(), inside a python script and redirect to an error 
page.


I found many posts about get_transaction().rollback() but it is 
deprecated in Zope 2.9. What is the modern way of doing this?


I'd use a custom error_page and just raise the exception.

Regards
Tino
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Transaction rollback

2006-06-20 Thread Chris McDonough

import transaction
transaction.abort()

should do it.  I will spare you the nannylike warnings about managing  
your own transaction state..


- C

On Jun 20, 2006, at 11:21 AM, Luiz Fernando B. Ribeiro wrote:

I need to return an error page with instructions after verifying a  
request but I need to do a rollback. How can I call a full  
rollback, like when using raise(), inside a python script and  
redirect to an error page.


I found many posts about get_transaction().rollback() but it is  
deprecated in Zope 2.9. What is the modern way of doing this?


Thanks in advance.

--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )