[Zope] Extending Image via ZClass

James W. Howe jwh@allencreek.com
Wed, 19 Jan 2000 12:21:22 -0500


At 11:33 AM 1/19/00 -0500, you wrote:
> > -----Original Message-----
> > From: James W. Howe [mailto:jwh@allencreek.com]
> > [...]
> > I get an img tag for the image associated with my object.
> > What I want to
> > be able to do is generate my own tags so as to include caption and
> > attribution information in a standard format.  How can I do this?
>
>Overload the __str__ method.  Unless there is some other product or
>ZClass someone has made that allready does this, you will need to create
>a Python base class and override __str__ there.
>
>It's not a bad idea to have a P Base class anyway.

Where is the best place to learn how to write my own Python Base class?  I 
know the basic Python syntax for creating new subclasses, but I'm not sure 
how this all works in the context of Zope.  For example, which directory 
should I put my new class file in?  Should it just go in my products 
directory?  Do I need to do anything special to make it work as a base 
class for a ZClass?  Are there standard things which should be "imported" 
into my .py file to make things work with Zope?  Is there a simple example 
of this that I could look at somewhere?

Thanks.

James W. Howe				mailto:jwh@allencreek.com
Allen Creek Software, Inc.		pgpkey: http://ic.net/~jwh/pgpkey.html		
Ann Arbor, MI  48103