[Zope] Creating a ZClass instance via an external method

Dieter Maurer dieter at handshake.de
Tue Jun 8 15:56:12 EDT 2004


Small Business Services wrote at 2004-6-8 11:49 -0400:
> ...
>Here is the external method:
>
>def mytest(self):
>       recid = "100"
>       newobj =
>self.WebSitesChildData.manage_addProduct['SWV2'].WebSites.createInObjectMana
>ger(self, recid, REQUEST)
>       return newobj
> ...
>  Module ZClasses.ZClass, line 449, in createInObjectManager
>  Module ZPublisher.mapply, line 77, in mapply
>AttributeError: get

Apparently, the "REQUEST" above is not a request object
(it does not have a "get" method).

Try "self.REQUEST" instead.

-- 
Dieter



More information about the Zope mailing list