[Zope] ZPT nebie questions

Dieter Maurer dieter@handshake.de
Wed, 15 Jan 2003 23:20:38 +0100


Charlie Reiman wrote at 2003-1-14 11:39 -0800:
 > I'm in the middle of trying to reimplement some DTML stuff in ZPT and =
I'm
 > hitting what must be newbie problems.
 >=20
 > 1) Iteration and python expressions.
 >=20
 > I've got something like this:
 >=20
 >     <table class=3D"info" width=3D"100%"
 > =A0   tal:repeat=3D"origin python:here.getorigins(
 >       fd=3Drequest.other['from_date'],
 >       td=3Drequest.other['to_date'])">
 >=20
 > I then want to nest another repeat statement, based on origin:
 >=20
 > <tr class=3D"somerow"
 >  tal:repeat=3D"row python:here.innerstuff(
 > =A0request.other['from_date'],
 > =A0request.other['to_date'],
 >  origin)">    <!-- this line is borked -->
 >=20
 > Using 'origin' here fails,
This should not fail.

What happens precisely? Exception (Type, Value + Traceback!), wrong resul=
t?

 > ...

 > 2) Whither 'fmt=3D'?
There are three types of "fmt":

  1. "C"-type format strings: use a python expression with the "%" operat=
or

  2. single parameter methods: use "obj/method"

  3. special formatters: you find them in "Products.PythonScripts.standar=
d"


Dieter