[Zope-dev] adding custom products programmatically

Kaimar Karu Kaimar.Karu@artaxis.ee
Fri, 19 Jul 2002 08:11:24 +0300


Hi,

I created a new Product, "GalahadFile" and in it I created several Z
Classes, GalahadImageFile for example. Now if i want to use python
script to add a GalahadImageFile programmatically - what should I do?

I add Image files this way:
context.galahad.file_storage[str(org_id)].manage_addImage(str(new_id),
file=new_contents, title=new_title)

and I want to add GalahadImageFiles this way:
context.galahad.file_storage[str(org_id)].manage_addGalahadImageFile(str(new_id), 

file=new_contents, title=new_title)

What should I do for this? What methods should I add and where for this 
"manage_addGalahadImageFile" to work?

TIA,
Kaimar