__bobo_traverse__ or similiar with python tales expression?
Sebastian Tänzer <st-QH+HwckL5+RBDLzU/[email protected]> Sat, 11 Jul 2015 19:53:29 +0200
| Newsgroups | gmane.comp.web.zope.general |
|---|---|
| Message-ID | <[email protected]> |
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
_______________________________________________
Zope maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )