[Zope] ImageFile in python class
Tue, 29 May 2001 13:36:00 -0400
It's unclear what you're actually trying to accomplish....
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, whic=
takes Image and extends it so the object can contain two images
> From: Jean-Fran=E7ois M=E9nard <email@example.com>
> Date: Tue, 29 May 2001 12:45:53 -0400
> To: <firstname.lastname@example.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 =3D ImageFile('www/image.gif', globals())
> index_html =3D 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.
> <img src=3D"<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... : /
> Zope maillist - Zope@zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-dev )