ZCML allowed_attributes corresponding method in five.grok

PloneZopeGrok

Plone Problem Overview


Is there a way to mark methods traversable in grok.CodeView classes, like you can do with Zope 3 BrowserView and allowed_attributes ZCML configuration directive?

I found docs about grok.traversable() but it looks like such method does not exist in five grok package.

Plone Solutions


Solution 1 - Plone

It is not possible: "the render() method is the only traversable in grok.codeView classes"

as stated in: https://developer.plone.org/templates_css_and_javascripts/javascript.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMikko OhtamaaView Question on Stackoverflow
Solution 1 - PloneMax LangerakView Answer on Stackoverflow