Hi,
How can I access an attribute of a BrowserView's context if the
attribute's name is not hardcoded?
Example:
Works: self.context.myattribute
Works: removeSecurityProxy(self.context).__getattribute__('myattribute')
What I want to do:
Doesn't work:
On 2/20/06, Frank Burkhardt [EMAIL PROTECTED] wrote:
Works: self.context.myattribute
Works: removeSecurityProxy(self.context).__getattribute__('myattribute')
What I want to do:
Doesn't work: self.context.__getattribute__('myattribute')
getattr(self.context, 'myattribute')
--
Lennart
On Monday 20 February 2006 06:58, Frank Burkhardt wrote:
Doesn't work: self.context.__getattribute__('myattribute')
That's because __getattribute__ has no security declaration. Anyways you
should not use it this way anyways. Frank's response should do the trick.
Regards,
Stephan
--
Stephan