Re: [Zope-dev] Adding Properties to Folder Objects via a Zope
Python Script
by Leonardo Rochael Almeida other posts by this author
Jan 31 2003 12:58PM messages near this date
[Zope-dev] Adding Properties to Folder Objects via a Zope Python Script
|
[Zope-dev] Re: [Zope-Coders] FYI: Zope 2.6.1 b2 scheduled for friday
On Thu, 2003-01-30 at 19:52, Asad Habib wrote:
> Hi. I was wondering whether any of you know if it is
> possible to create properties for Folder objects using
> a Zope Python script that can then be invoked from a
> DTML method. I know that this is possible using Zope's
> management interface, but this procedure is not
> scalable. Any input would be appreciated. Thanks.
In your PythonScript, call
theFolder.manage_addProperty(id=<property-id> , value=<property-value>, type=<property-type>)
later on, when you need to change a property, you can call:
theFolder.manage_changeProperties(<property-id> =<property-value>)
For more information on managing properties, read the file
<your zope> /lib/python/OFS/PropertyManager.py
Cheers, Leo
--
Ideas don't stay in some minds very long because they don't like
solitary confinement.
_______________________________________________
Zope-Dev maillist - Zope-Dev@[...].org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )
Thread:
Asad Habib
Leonardo Rochael Almeida
Leonardo Rochael Almeida
Evan Simpson
Paul Winkler
|