[Zope] Zclass containing an image

Bart Hubbard bart at barthubbard.com
Fri Aug 15 12:57:33 EDT 2003


I'm creating a component that has a set of ZClasses representing different types of custom content, and for a couple of
the types, I want them to have not just standard properties, but associated images.  For example, a Medical Article that
has a small image for use at the top of the article's front page.

For this class, I've subclassed my custom MedicalContent class, CatalogPathAwareBase, and  also ObjectManager.  I was
thinking that an instance of this class would actually contain the associated image.  I've customized the AddForm for
this class, but haven't tried to tackle how to get that image into it.  I don't want to rely on the users to have to
view objects of this type like a folder, and then add images willy-nilly.

Anyway - any thoughts on what I'm doing?  Is this a crazy approach?  If not, I'd appreciate pointers to example code for
creating forms that allow uploading Images (Files, etc.) in Zope.  I tried downloading an example product from Zope.org
for an Ad Banner product, but the tgz is corrupted...

Much thanks,
bart





More information about the Zope mailing list