[Zope] ImageFile in python class
marc lindahl
marc@bowery.com
Tue, 29 May 2001 13:36:00 -0400
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, whic=
h
takes Image and extends it so the object can contain two images
> From: Jean-Fran=E7ois M=E9nard <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
>=20
> Thanks Marc for your response!
>=20
> But... There MUST be a better way to publish an image in a python class?
>=20
> Here is what I would like to do:
>=20
> class MyClass(self):
> """ Class example """
>=20
> image =3D ImageFile('www/image.gif', globals())
> index_html =3D DTMLFile('dtml/manage_myclass.dtml', globals())
>=20
> def __init__(self, id, title):
> """ Initialization of my class """
> ...
>=20
> How can I use the "image" property in my "index_html" dtml file???
>=20
> I tried:
>=20
> <dtml-var image> give me a broken image.
>=20
> Then:
>=20
> <img src=3D"<dtml-var absolute_url>/image>
>=20
> Broken image again...
>=20
> I looked at the code in OFS/misc_ , with no luck...
>=20
> Any help would be VERY appreciated... I'm stuck on this problem for _too=
_
> long now... : /
>=20
> Thanks!
>=20
> J-F
>=20
>=20
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -=20
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )