RE: [Zope] securityinfo for a class
Double thanks! For this solution and for writing the minimal howtos. That's where I started to prepare for the product I'm writing. Cheers, Fernando Max M wrote:
Fernando Martins wrote:
Hello,
I'm creating a Product with a function retrieve(self, num) which returns an email.Message object.
In a zpt of the product I've
<div tal:define="msg python:here.retrieve(request['num'])">
and I would like to manipulate msg using email.Message methods, like in
<td tal:content="python:msg.get('from')">name</td>
I've added these delarations to my __init__.py
ModuleSecurityInfo('email').declarePublic('Message') ModuleSecurityInfo('Message').declarePublic('get')
This doesn't work, it prompts the login box.
How can I use Message's methods in a page template or Python Script?
Either use a wrapper, or set the:
email.Message.__allow_access_to_unprotected_subobjects__=1
on the email instance.
regards Max M
participants (1)
-
Fernando Martins