[Zope] load_site.py and zpt files

Dieter Maurer dieter@handshake.de
Fri, 13 Sep 2002 20:18:22 +0200


jbr@FIZ-Karlsruhe.DE writes:
 > ...
 >     call(object.manage_addProduct['PageTemplates'].manage_addPageTemplate( id=name, title='', text=f))
 > ...
 >     call(object.manage_addProduct['PageTemplates'].manage_addPageTemplate( id=name, title='', text=f))
 > AttributeError: Function instance has no attribute '__getitem__'
"object.manage_addProduct" is a "Function" instance (defined in
"ZPublisher.Client"). It does not have a "__getitem__" instance.
Therefore, you cannot use subscription ("[...]").

Use 'Client.call("%s/manage_addProduct/PageTemplates/manage_addPageTemplate" % URL_TO_OBJECT, id=name, title='', text=f)'


Dieter