[Zope] Convert Photos to ExtImage store

2005-04-19 Thread David Chandek-Stark
I have a few PhotoFolders containing Photos that are stored in the ZODB 
which I would like to convert to ExtImage storage. Since the number is 
large enough to make a manual process painful, I'd like to write a 
conversion script. Seems simple enough in principle, but I'm having 
trouble getting started. First, how do you use manage_addPhoto()? I 
assumed that photo_folder.manage_addPhoto() would work, but I get

AttributeError: manage_addPhoto
Ideally, the script would operate on a PhotoFolder object, say, making a 
new PhotoFolder, then creating all the new Photos based on the old ones. 
I can manually delete the old folder and rename the new one.

Thanks,
David
Zope 2.7.0/Python 2.3.2
Photo 1.2.3
___
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 )


Re: [Zope] Convert Photos to ExtImage store

2005-04-19 Thread J Cameron Cooper
David Chandek-Stark wrote:
I have a few PhotoFolders containing Photos that are stored in the ZODB 
which I would like to convert to ExtImage storage. Since the number is 
large enough to make a manual process painful, I'd like to write a 
conversion script. Seems simple enough in principle, but I'm having 
trouble getting started. First, how do you use manage_addPhoto()? I 
assumed that photo_folder.manage_addPhoto() would work, but I get

AttributeError: manage_addPhoto
Ideally, the script would operate on a PhotoFolder object, say, making a 
new PhotoFolder, then creating all the new Photos based on the old ones. 
I can manually delete the old folder and rename the new one.
The factory method is not available in context: you must get it with 
manage_addProduct. See, for example,

http://zopelabs.com/cookbook/1012279676
You may also be interested in
http://vsbabu.org/webdev/zopedev/zodb2ext.html
		--jcc
___
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 )