[Zope] manipulating zodb from independent database connection
thedagdae at gmail.com
Wed Apr 11 01:19:43 EDT 2007
Does anybody have a script available that shows how to insert objects
into the ZODB root['Application'] from a non-zope process outside the
Zope application? Everytime I try to read root['Application'] I get a
page template error.
I'm using zope 2.5 (matches a book I like) and doing like so:
>>> from ZODB import FileStorage, DB
>>> storage = FileStorage.FileStorage('Data.fs')
>>> db = DB(storage)
>>> connection = db.open()
>>> root = connection.root()
Also, can the ZODB be altered this way on a running Zope instance? I
would like to have a script run on cron and insert objects and remove
objects from the ZODB while the zope instance application is running.
I'd like these newly inserted objects to be Zpublishable as well.
More information about the Zope