[Zope] referencing a folder

Marie Robichon robichon@esrf.fr
Tue, 15 Apr 2003 16:42:09 +0200


At 14:15 15/04/2003 +0000, you wrote:
>At 15:45 2003-04-15 +0200, Marie Robichon said:
>>Hi,
>>
>>I want to add an object via a python script, but cannot find the syntax 
>>to reference the destination folder which is in the 'Intranet' virtual 
>>root of my site
>>The following doesn't work and I've tried various other ways, and haven't 
>>found a faq or solution anywhere.  Probably something dumb again.....
>>
>>newsfolder=News.FrontNews
>>
>>newsfolder.manage_addProduct['EasyEditor'].addEasyNewsItem(
>>note_id,
>>note_title...............
>
>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?

Marie



Marie Robichon

Web Task Force
European Synchrotron Radiation Facility
BP 220
38043 Grenoble Cedex
France

http://www.esrf.fr

Tel: (33) 04 76 88 21 86
Fax: (33) 04 76 88 24 27