* Stéphane MOLINA <[EMAIL PROTECTED]> [2004-07-01 16:50]: > > Hello, > > I have some problem using manage_addPageTemplate : > > I use it in my object constructor, : > > class UserManager(Folder, Persistent, RoleManager, Item, ): > """ > A user manager : simple user dictionnary > """ > security = AccessControl.ClassSecurityInfo() > security.declareObjectPublic() > > meta_type = 'UserManager' > > def __init__(self, id): > self.id = id > self.manage_addUserFolder() > > self.manage_addProduct['PageTemplates'].manage_addPageTemplate("usermanager_properties_form", > "edit", "zpt/usermanager_properties_form.zpt") > > self.manage_addProduct['PageTemplates'].manage_addScript("usermanager_properties", > "edit", "zpt/usermanager_properties.py") > > I get this error : > > Site Error > > An error was encountered while publishing this resource. > > Error Type: AttributeError > Error Value: _getProducts
Your instance is not acquisition wrapped during __init__ and the ProductDispatcher needs to acquire '_getProducts'. Use manage_afterAdd to do setup stuff like that. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )