Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-17 Thread Shailesh Kumar
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'] =

Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-17 Thread Tom Gross
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

Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-17 Thread Thierry Florac
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 =

Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-17 Thread Shailesh Kumar
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...)

[Zope3-Users] how to access the root folder in normal operation

2006-11-15 Thread Shailesh Kumar
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

Re: [Zope3-Users] how to access the root folder in normal operation

2006-11-15 Thread Tom Gross
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