John Maddison wrote:
Is it possible/wise to "auto-create" content objects in the ZODB? Say I'm creating a blog application and have a container type(BlogContainer) and want an instance called "blog" in the root of the ZODB. Is it possible to programatically specify this, or is my only option to create it through the ZMI? I thought that perhaps an event was generated when the root object was created that I could hook into, but it seems not.

Yeah, like Stephan says, Zope should probably send an IObjectCreatedEvent there. In the mean time, you can hook into IDatabaseOpenedEvent which gets sent every time Zope starts up and opens a connection to the ZODB.

Zope3-users mailing list

Reply via email to