[Zope] Python Script: excape problem /kv
Kai Vermehr
k at eboy.com
Thu Nov 6 07:11:00 EST 2003
I'm working through an example in the Zope Book and I want to display a
random image inside the folder 'images'. But instead of a picture I get
the source with all the tags escaped.
I have this Python script named 'randomImage':
------------------------------------
import random
return random.choice(context.objectValues('Image'))
------------------------------------
I have this body in a ZPT named 'use_randomImage':
------------------------------------
<body>
<span tal:replace="here/images/randomImage">image</span>
</body>
------------------------------------
And I get this generated source w escaped tags (body) when I call the
ZPT:
------------------------------------
<body>
<img
src="http://www.mycomputer.local/images/deck_mika.gif"
alt="deck_mika.gif" title="deck_mika.gif"
height="142" width="35" border="0" />
</body>
------------------------------------
of course I want the image instead of escaped html ...
any ideas what I'm doing wrong?
thanks! 'K:?
--
Kai Vermehr | eBoy
http://www.eboy.com
More information about the Zope
mailing list