transaction commit inside a Python Script?
I need to perform a transaction commit inside a Python Script, but get_transaction doesn't appear to be available. Can anyone hint at how to access the transaction to commit it? Richard
Add: ModuleSecurityInfo('Transaction').declarePublic('get_transaction') to your PythonScript security file blah and then you can do: import ZODB ZODB.Transaction.get_transaction() Will waiting for a the posts to tell me why this is bad, heres another way http://www.zopelabs.com/cookbook/1000910877 Cheers -- Andy McKay Agmweb Consulting http://www.agmweb.ca ----- Original Message ----- From: "Richard Jones" <rjones@ekit-inc.com> To: <zope@zope.org> Sent: Thursday, September 05, 2002 10:08 PM Subject: [Zope] transaction commit inside a Python Script?
I need to perform a transaction commit inside a Python Script, but get_transaction doesn't appear to be available. Can anyone hint at how to access the transaction to commit it?
Richard
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Fri, 6 Sep 2002 3:45 pm, Andy McKay wrote:
Add:
ModuleSecurityInfo('Transaction').declarePublic('get_transaction')
to your PythonScript security file blah and then you can do:
import ZODB ZODB.Transaction.get_transaction()
Will waiting for a the posts to tell me why this is bad, heres another way http://www.zopelabs.com/cookbook/1000910877
Thanks! Richard
participants (2)
-
Andy McKay -
Richard Jones