[Zope] Property Sheet access from Python Products
Robert Roy
rjroy@takingcontrol.com
Sun, 19 Mar 2000 11:53:56 -0500
I am creating a product in Python and I want to use property sheets. I am able to add sheets and add properties to those sheets. However how I have to access the property sheets differently than if I was accessing property sheets on a ZClass programmatically. I suspect that I am perhaps not using the right mixin classes.
For instance, I have a property sheet 'Private' with an attribute 'prop1'
If I create this in a ZClass, I can use
<dtml-var prop1> to access my attribute.
in my class I have to do the following
<dtml-var "propertysheets.get('Private').getProperty('prop1')"><p>
likewise in Python code I must access the attribute using
self.propertysheets.get('Private').getProperty('prop1')
where in a ZClass I could do
propertysheets.Private.prop1
My class declaration is as follows mixins:
class base(ObjectManager,PropertyManager,
Acquisition.Implicit,
Persistence.Persistent,
RoleManager):
Am I missing a mixin somewhere? Or do I have to access the attributes differently from a Python Class?
Thanks
Bob