Handling of objects returned from external methods within zope?
Hi, I'm using Zope 2.5.0 on Linux. I have created an external method in Zope which catalogs and external function. This function just creates on object of a class defined in the external file and returns this. 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? Thanks, Stephan
if you define new classes inside external methods and you want to use them in zope (meaning outside of the external method itself) you have clearly overstepped the scope of what external methods are there for. you should write a real zope python product. jens On Wednesday, Sep 18, 2002, at 10:28 US/Eastern, Stephan Herschel wrote:
Hi,
I'm using Zope 2.5.0 on Linux.
I have created an external method in Zope which catalogs and external function. This function just creates on object of a class defined in the external file and returns this.
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?
Thanks, Stephan
Stephan Herschel writes:
I'm using Zope 2.5.0 on Linux.
I have created an external method in Zope which catalogs and external function. This function just creates on object of a class defined in the external file and returns this.
The class looks like this:
class x: def y (s): return 1 You want to read the Zope Developer Guide, especially the security chapter and the staff about security declarations.
Keep in mind, that most security declarations (the "declareProtected" family) require your class to derive from "Acquisition.Ex/Implicit" and be wrapped in the correct context. Dieter
participants (3)
-
Dieter Maurer -
Jens Vagelpohl -
Stephan Herschel