Following up from plone/Products.CMFPlone#2839:
Why does RestrictedPython not allow to use
python:mytemplate.macros['master'] in a template but
mytemplate/macros/master is allowed? macros is the property chameleon.zpt.program.import.macros which returns a chameleon.zpt.template.Macros object.
Allowed:
<pre tal:define="template python:context.restrictedTraverse('@@main_template')"
tal:content="template/macros"></pre>
Not allowed:
<pre tal:define="template python:context.restrictedTraverse('@@main_template')"
tal:content="python:template.macros"></pre>
Following up from plone/Products.CMFPlone#2839:
Why does RestrictedPython not allow to use
python:mytemplate.macros['master']in a template butmytemplate/macros/masteris allowed?macrosis the propertychameleon.zpt.program.import.macroswhich returns achameleon.zpt.template.Macrosobject.Allowed:
Not allowed: