[Zope] __bobo_traverse__ or similiar with python tales expression?
Sebastian Tänzer
st at taenzer.me
Sat Jul 11 19:53:29 CEST 2015
Hello fellow Zopees,
the product we’re using (ZMS) allows methods as attributes to custom object models. These methodes (PythonScript) are created inside a metamanager container as „Wiki.mymethod“, where Wiki is the meta type of the custom object.
The pathhandler method of these custom objects modifies __bobo_traversal__ for normal http requests and maps these non-existing methods in that context to existing methods in the metaobj_manager container using the context meta_id.
Calling the same method from a PageTemplate or other PythonScript does not reflect that and - not surprisingly - returns an AttributeError:
File "/opt/python/zope2-pip/lib/python2.7/site-packages/Products/PageTemplates/ZRPythonExpr.py", line
48, in __call__
return eval(self._code, vars, {})
File "PythonExpr", line 1, in <expression>
AttributeError: dummyFunction
Is there a way to modify traversal behaviour from the Product or somehow different?
Best
Sebastian
More information about the Zope
mailing list