[Zope] object attribute access in zpt

zope at netchan.cotse.net zope at netchan.cotse.net
Thu Feb 26 20:08:03 EST 2004


Let 'pdate' be a python datetime object. I can do this:
'tal:attribute="value python:now"'
However if I try to print out an attribute of 'now', like
'tal:attributes="value python:pdate.year"', I get a login prompt and the
page fails with the following message:
[...]
    *  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
      __traceback_info__: pdate.year
    * Module Python expression "pdate.year", line 1, in <expression>

Unauthorized: You are not allowed to access 'year' in this context

Anyone know how to avoid this?

Regards,
Sandor




More information about the Zope mailing list