[Zope] how to change a title from python script?
Casey Duncan
cduncan@kaivo.com
Thu, 19 Apr 2001 16:51:32 -0600
alex wrote:
>
> Hey guys,
>
> does anyone of you know how can an object title be changed without using the
> ugly manage_edit() method ?
>
> I was expecting something more intuitive as in
>
> dtml_method.title = 'new title
> instead of:
> dtml_method.mange_edit(data=dtml_object, title='new title')
>
> reasons why I dont like manage_edit() ?
>
> - It's a complete different method on each object. so you have to call it
> with different arguments depending the object you want to edit.
> - It's not intuitive at all!
>
> thanks for your help !
>
> Alex
Although it is still an ugly manage_ method, manage_changeProperties has
basically the same syntax for all objects (excepting ZClass properties
on custom property sheets). try:
obj.manage_changeProperties(title='new title')
hth,
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>