Can not add photofolder programmatically
Hi there, I am trying to add a photofolder by help of a script. context.manage_addProduct['ZipFolder']..... works as does context.manage_addProduct['Photo'] where context.manage_addProduct['PhotoFolder ']... does not. I get an error Error Type: AttributeError Error Value: PhotoFolder How comes? thanks for your typs Robert
context.manage_addProduct['PhotoFolder ']...
Could be the space on the end of "PhotoFolder " in your line. Or you could have the wrong meta_type, what is the meta_type of PhotoFolder? (it may not be what you think) Cheers. -- Andy McKay.
Use the following: context.manage_addProduct['Photo'].manage_addPhotoFolder(id, title) The Photo Folder's add method is in the 'Photo' product. _______________________ Ron Bickers Logic Etc, Inc.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Robert Rottermann Sent: Tuesday, September 04, 2001 11:41 AM To: zope@zope.org Subject: [Zope] Can not add photofolder programmatically
Hi there,
I am trying to add a photofolder by help of a script.
context.manage_addProduct['ZipFolder']..... works as does context.manage_addProduct['Photo'] where context.manage_addProduct['PhotoFolder ']... does not. I get an error Error Type: AttributeError Error Value: PhotoFolder
How comes?
Robert Rottermann writes:
I am trying to add a photofolder by help of a script.
context.manage_addProduct['ZipFolder']..... works as does context.manage_addProduct['Photo'] where context.manage_addProduct['PhotoFolder ']... You notice the space: ^
Spaces are significant in strings....
does not. I get an error Error Type: AttributeError Error Value: PhotoFolder
Dieter
participants (4)
-
Andy McKay -
Dieter Maurer -
Robert Rottermann -
Ron Bickers