[ZPT] FORMs and processing

Evan Simpson evan@digicool.com
Tue, 26 Jun 2001 16:09:26 -0500


From: "Tony McDonald" <tony.mcdonald@ncl.ac.uk>
> > ...but the sql query and "do stuff" look like prime candidates for a
> > Script.
>
> Do you mean that the sql_query should set local variables?, ie
> <span tal:define="surname row/surname" />
>
> (does this mean that the variable is defined in the context of the
whole PT,
> or just the span).

It would only be defined on the span, unless you added the "global"
keyword.  This isn't what I meant, though.

> I agree that 'do stuff' should be a Script, in my case it would be
doing SQL
> updates and calling methods to send emails etc. Is it sensible to do
> something like;
>
> <span tal:replace="here/do_stuff" />

I would write <span tal:replace="nothing" tal:define="call
here/do_stuff" /> ("call" is just a dummy variable), but the idea is the
same.  This is pretty much what I was suggesting, except that I would
use a Python Script, not a DTML Method.

Cheers,

Evan @ digicool