how do I automatically create some needed object at application startup?

Do it by subscribing to IDatabaseOpenedWithRootEvent (from

Example code:

def CreateMyContainer(event):
    conn =
    root = conn.root()['Application']
    if 'mycontainer' not in root:
        root['mycontainer'] = MyContainer()

Then register this subscriber in your configure.zcml:
<subscriber handler="myapp.CreateMyContainer" />
Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to