[Zope] newbie question: to edit/delete in zodb

J Cameron Cooper jccooper at jcameroncooper.com
Thu Sep 4 18:42:31 EDT 2003


> I am a newbie to zope. I need a sample code to perform,
> editing/deleting properties of zodb object
> I use the following code to add a file to a folder as well as
> properties of that.
> //////////////
> entries_folder.manage_addProduct['OFSP'].manage_addFile(id, title="",
> content_type="text/plain", file=comments)
> # add a required properties
> entry=getattr(entries_folder, id)
> entry.manage_addProperty('name', name, 'string')
> ////////////////

manage_changeProperties()
manage_delProperties()

http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AppendixB.stx
http://cvs.zope.org/Zope/lib/python/OFS/PropertyManager.py?rev=HEAD&content-type=text/vnd.viewcvs-markup
http://www.zopelabs.com/cookbook/995012093

Note that the documentation in the Zope Book is incomplete about 
PropertyManager. It does in fact provide many of the same method 
signatures as PropertySheet.

          --jcc

-- 
"Code generators follow the 80/20 rule. They solve most of the problems, but not all of the problems. There are always features and edge cases that will need hand-coding. Even if code generation could build 100 percent of the application, there will still be an endless supply of boring meetings about feature design."
(http://www.devx.com/java/editorial/15511)





More information about the Zope mailing list