It's unclear what you're actually trying to accomplish.... are you: 1. trying to create (instantiate) images for general use in zope (e.g. your python method is creating a bunch of stuff like a template) 2. trying to create a zope object which contains images (somehow, doesn't that sound like a folder? well, it could be a new datatype, like JPicture) 3. trying to create a special type of image object? for 1., consider making a template folder somewhere, and a script to copy the whole folder to the new place and rename it.... for 2. or 3., perhaps take a look at the guts of the JPicture product, which takes Image and extends it so the object can contain two images
From: Jean-François Ménard <menard.jean-francois@hydro.qc.ca> Date: Tue, 29 May 2001 12:45:53 -0400 To: <zope@zope.org> Subject: [Zope] ImageFile in python class
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
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )