RE: [Zope] Handling of objects returned from external methods within zope?
[Stephan Herschel]
... The class looks like this:
class x: def y (s): return 1
Within Zope I now try to call the method y() of the object that is returned by the external function. This does not work - zope want's me to (re)login immediately.
I guess I'm just not allowed to use classes defined outside of zope within zope. Is there some way to register a class so that it's objects can be used inside of Zope? If so, how can I achieve this?
External methods are functions, not methods. But if the function returns an object you should be able to use its methods. You better show us just how you are trying to do this. Cheers, Tom P
On Wed, 18 Sep 2002, Passin,Thomas B. (Tom) wrote:
External methods are functions, not methods. But if the function returns an object you should be able to use its methods.
Actually you should not, because it might be insecure to import untrusted objects. But you can declare objects to be trustworthy. Try putting the line __allow_access_to_unprotected_subobjects__=1 in the class definition. (I have Casey Duncan to thank for suggesting this to me when I faced the same problem some while ago.) David
participants (2)
-
DA Loeffler -
Passin,Thomas B. (Tom)