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

Shailesh Kumar shaileshk at gmail.com
Fri Nov 17 06:29:36 EST 2006


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> 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
> > http://mail.zope.org/mailman/listinfo/zope3-users
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20061117/dcc63fe8/attachment.htm


More information about the Zope3-users mailing list