nienfeng :


I create a folder in ZMI, and add several attributes in it.
In the folder, I add a Script that modify the folder's attribute.
How should I do?


I find it : manage_changeProperties()
but There are still something I don't know.

EX:
   Email/ (folder), has 3 properties: mTo, mFrom, mCC
         MailHost(Mailhost)
         set (Script Python)

   in set:
## Script (Python) "set"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
print container.propertyItems()
# output: [('title', ''), ('mTo', 'nienfeng@'), ('mFrom', 'nienfeng@'), ('mCC', '')]
print container['MailHost'].propertyItems()
# output: still as same as above
print container['MailHost']
# output <MailHost at MailHost>

container.manage_changeProperties(mTo='testTo')
# It work
container['MailHost'].manage_changeProperties(smtp_host='testHost')
# It don't work and have not any ErrorMessage

What's wrong with the container['MailHost'].propertyItems() and container['MailHost'].manage_changeProperties(smtp_host='testHost')

Thanks. by nienfeng
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to