Hi,
zope.traversing.api.getRoot returns the root of a given object. What I
wanted to do was that when zope starts, I would like to create a few content
objects inside the root folder.
Something like:
root = getRootFolder() #using some way I don't know.
root['etc'] = Folder()
root['var'] =
Hi Shailesh,
take a look at zope.app.appsetup. You could subscribe to the
DatabaseOpenedWithRoot-event.
Cheers
-Tom
Shailesh Kumar wrote:
Hi,
zope.traversing.api.getRoot returns the root of a given object. What
I wanted to do was that when zope starts, I would like to create a few
Le vendredi 17 novembre 2006 à 16:59 +0530, Shailesh Kumar a écrit :
Hi,
zope.traversing.api.getRoot returns the root of a given object. What
I wanted to do was that when zope starts, I would like to create a few
content objects inside the root folder.
Something like:
root =
Thank you very much. This technique works perfectly.
-shailesh
On 11/17/06, Thierry Florac [EMAIL PROTECTED] wrote:
Le vendredi 17 novembre 2006 à 16:59 +0530, Shailesh Kumar a écrit :
I currently use something like this, to handle a site configuration on
startup (define catalog indexes...)
Hi,
In a functional test setup, one can access the root folder using getRootFolder() of FunctionalTestSetup.
How can I access the root folder in a nomal operation mode? Is there some mechanism to do that?
Thank you very much.
With regards,
-shailesh
Hi Shailesh,
have a look at zope.traversing.api. There's a getRoot-method.
Cheers
-Tom
Shailesh Kumar wrote:
Hi,
In a functional test setup, one can access the root folder using
getRootFolder() of FunctionalTestSetup.
How can I access the root folder in a nomal operation mode? Is