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

Tom Gross tom at lalisio.com
Fri Nov 17 08:32:21 EST 2006


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 
> content objects inside the root folder.
>  
> Something like:
> root = getRootFolder() #using some way I don't know.
> root['etc'] = Folder()
> root['var'] = Folder()
> ...
>  
> Is it possible to do that?
>  
> With regards,
> -shailesh
>  
>
>  
> On 11/15/06, *Tom Gross* <tom at lalisio.com <mailto:tom at lalisio.com>> 
> wrote:
>
>     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
>     there
>     > some mechanism to do that?
>     >
>     > Thank you very much.
>     >
>     > With regards,
>     > -shailesh
>     >
>     >
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>
>     >
>     > _______________________________________________
>     > Zope3-users mailing list
>     > Zope3-users at zope.org <mailto:Zope3-users at zope.org>
>     > http://mail.zope.org/mailman/listinfo/zope3-users
>     >
>
>



More information about the Zope3-users mailing list