ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> zope-Dev
zope-Dev
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved