[Zope] dtml-in format

Andreas Jung andreas at andreas-jung.com
Fri Aug 8 07:24:43 EDT 2003



--On Donnerstag, 7. August 2003 16:24 Uhr -0600 Ben Bush <ben at center7.com> 
wrote:

> I would like to use dtml-in to iterate through some results in a python
> script. I am not sure what format I need to put the results into in my
> python script to be able to reference them in the <dtml-in> tags. I am
> currently trying to return a dictionary but that does not seem to work.

You need to return a sequence (means a list or a tuple). If you return a 
dict,
then you need to iterate over the keys() or values() or items() of the dict
but *not* over the dict itself. CHeck the Python docs for details.

-aj




More information about the Zope mailing list