[ZPT] Re: a little more on scripts execution
Dieter Maurer
dieter@handshake.de
Sun, 11 Aug 2002 19:45:46 +0200
Michal Kurowski writes:
> I've got a couple of tables and I access them with a single script
> using "lists of dictionaries".
> Then I render them in ZPT.
> What is needed is to pass those sql data around, for example to some
> scripts using links as above.
I see two options:
1. you explicitly pass the data around via return value and parameters
2. you put them in the "REQUEST" object
Both ways are restricted to a single request processing.
ZSQL results are too complex to be stored in a (standard Zope 2.5) session
object.
> ...
> But for now I'm seeking for wizards' knowledge about namespaces in
> ZPT and such.
ZPT namespaces cannot be used to pass information from inside a
script to the ZPT implicitly, you need to return the information
as the scripts return value and bind it to a name in the ZPT namespace.
I am not sure whether the ZPT namespace is automatically passed to
Python Scripts when they bind the "namespace" binding variable.
It may be the case. You can go via an intermediate DTML object,
if it does not work (though I do not recommend this way).
Dieter