[Zope] PythonScript and ZClass generation problem

Dieter Maurer dieter@handshake.de
Wed, 17 Jan 2001 21:44:41 +0100 (CET)


Alexander Limi writes:
 > ... in PythonScript ...
 > return self.artists.manage_addProduct['Artist'].Artist_add(_.None,_)
 > 
 > but then the REQUEST object was not available, and the object creation fails
 > since it can't find the variables it needs. The traceback for this was:
It seems that you PythonScript was called without a namespace
being passed.
In this case, a new (essentially empty) "_" is created.
It does not contain 'REQUEST'.

You could try
   return self.artists.manage_addProduct['Artist'].Artist_add(_.None,REQUEST)


Dieter