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

Chris Withers chrisw@nipltd.com
Fri, 16 May 2003 11:31:56 +0100

D2 wrote:
> I don't know if it's clear or useful but it'a an answer to your question.

Well, don't know how it relates to your abuse of the properties system...

> PS : I modify my function without exec:
> def add_ClassProperty(product, module, some_class, property, value)
>     object=__import__('module', globals(), globals(),
>                       'Products.product')
>     klass=object.some_class
>     setattr(klass, property, value)
>     klass._properties=klass._properties+({'id':property,
>                                           'type':'string'},)
> Do you feel better ?

Not really, anything beyond stuff you can do with manage_addProperty is likely 
to get you into nastiness down the line...

good luck,