[Zope] TAL Question: Iterating through a list

Nesbitt, Steve snesbitt@cobaltgroup.com
Wed, 19 Feb 2003 22:08:27 -0800


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2D8A6.7BC1C564
Content-Type: text/plain;
	charset="iso-8859-1"

All:

I'm scratching my head trying to figure out how to to iterate over a list
using TAL. Here's the scenario:
I am calling a python script which wraps around a ZSQL method and simply
returns the result set. The set comes back as a list of dictionaries. I'm
getting stuck because I can't figure out how to tell TAL to to 1) grab each
item and 2) grab the value associated with each dictionary key.

On a related note is there a way to call a ZSQL method directly through page
templates?

Thanks in advance,

-steve

snesbitt@cobaltgroup.com

------_=_NextPart_001_01C2D8A6.7BC1C564
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>TAL Question: Iterating through a list</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>All:</FONT>
</P>

<P><FONT SIZE=3D2>I'm scratching my head trying to figure out how to to =
iterate over a list using TAL. Here's the scenario:</FONT>
<BR><FONT SIZE=3D2>I am calling a python script which wraps around a =
ZSQL method and simply returns the result set. The set comes back as a =
list of dictionaries. I'm getting stuck because I can't figure out how =
to tell TAL to to 1) grab each item and 2) grab the value associated =
with each dictionary key.</FONT></P>

<P><FONT SIZE=3D2>On a related note is there a way to call a ZSQL =
method directly through page templates?</FONT>
</P>

<P><FONT SIZE=3D2>Thanks in advance,</FONT>
</P>

<P><FONT SIZE=3D2>-steve</FONT>
</P>

<P><FONT SIZE=3D2>snesbitt@cobaltgroup.com</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2D8A6.7BC1C564--