[Zope] referencing a folder
Dylan Reinhardt
zope@dylanreinhardt.com
15 Apr 2003 10:58:03 -0700
On Tue, 2003-04-15 at 07:42, Marie Robichon wrote:
> At 14:15 15/04/2003 +0000, you wrote:
> >Hi Marie,
> >I think you might be missing 'context'?
> >
> >newsfolder=context.News.FrontNews
> >
>
> no using newsfolder=context.News.FrontNews gives me an AttributeError. The
> script is in fact in Intranet/Test/Marie/Notes and I want to add an
> EasyNewsItem to Intranet/News/FrontNews (Intranet being our virtual root)
> so I don't think I should be using context?
Might there be something else in Marie or Test called News?
Try:
newsfolder=context.Intranet.News.FrontNews
Though it's not often necessary, it's not a bad habit to work from the
common parent shared by the method and the target. It tends (IMO) to be
less susceptable to acquisition surprises.
HTH,
Dylan