[Zope-CMF] Product properties: set and get ?

Jean-Francois.Doyon@CCRS.NRCan.gc.ca Jean-Francois.Doyon@CCRS.NRCan.gc.ca
Thu, 20 Mar 2003 17:17:35 -0500


Hello,

I have a CMF product that defines a few custom object types ... Now I =
would
like said product to have properties set by default, that an =
administrator
could change.

One can easily do this through the ZMI, but I'd really like the product
itself to register and set them ...

I have tried putting an _properties tuple of dictionaries in my =
__init__.py:

_properties =3D ( {'id': 'rasterimagesfsroot', 'type': 'string' }, =
{'id':
'rasterimagesurlroot', 'type': 'string' }, )

But that didn't do anything.

How is this done ? Note that these should be properties of the product
itself (Edited through the properties tab of the product, in the =
control
panel), NOT of instances of the product.

And once they are set, how do I get to them? (i.e. how do i get the =
product
as an object?)

Thanks in advance for the help!

Jean-Fran=E7ois Doyon
Internet Service Development and Systems Support / Soutien de =
syst=E8mes et
developement de services Internet
GeoAccess Division / Division G=E9oAcc=E8s
Canada Center for Remote Sensing / Centre canadien de =
t=E9l=E9d=E9tection
Natural Resources Canada /  Ressources naturelles Canada
Phone / T=E9l=E9phone: (613) 992-4902
Fax / T=E9l=E9copieur: (613) 947-2410
http://atlas.gc.ca