[ZPT] FORMs and processing
Tony McDonald
tony.mcdonald@ncl.ac.uk
Thu, 28 Jun 2001 16:33:25 +0100
On 26/6/01 10:09 pm, "Evan Simpson" <evan@digicool.com> wrote:
> 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.
>
Understood, I guess using 'global' isn't a good idea.
>> 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
>
I understand a lot better now Evan,
Thanks a lot
Tone.
--
Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/
The Medical School, Newcastle University Tel: +44 191 243 6140
A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope