[Zope3-Users] Get to ZODB root from global utility
jsmith030416 at yahoo.co.uk
Wed Dec 14 15:37:40 EST 2005
> Did you try IBuddy? ;)
It was IBuddy that got me into this ! (mutters darkly
My utility bears a strong resemblance to IPostalLookup
Anyhow, I am pleased to report success, and thank you
for your pointers.
The lines below are for the benefit of google anyone
else who has the same problem.
0. How to access the Zope3 ZODB application root and
programmatically add content objects.
1. Upgrade to Zope 3.1.0
2. from ZODB.interfaces import IDatabase
3. db = zapi.getUtility(IDatabase)
4. conn = db.open()
5. root = conn.root().data['Application']
6. root['newobject']=<some new object> or navigate to
where you need to go
and tidy up.
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
More information about the Zope3-users