[Zope] ImageFile in python class

Jean-François Ménard menard.jean-francois@hydro.qc.ca
Tue, 29 May 2001 12:45:53 -0400


Thanks Marc for your response!

But...  There MUST be a better way to publish an image in a python class?

Here is what I would like to do:

class MyClass(self):
    """ Class example """

    image = ImageFile('www/image.gif', globals())
    index_html = DTMLFile('dtml/manage_myclass.dtml', globals())

    def __init__(self, id, title):
        """ Initialization of my class """
        ...

How can I use the "image" property in my "index_html" dtml file???

I tried:

<dtml-var image>  give me a broken image.

Then:

<img src="<dtml-var absolute_url>/image>

Broken image again...

I looked at the code in OFS/misc_ , with no luck...

Any help would be VERY appreciated...  I'm stuck on this problem for _too_
long now... : /

Thanks!

J-F