12 Sep
2006
12 Sep
'06
1:21 p.m.
--On 12. September 2006 14:16:23 +0100 Alan <alanwilter@gmail.com> wrote:
Dears,
I am looking for help.
I want to pass, when submitting a FORM from a page template, dictionary.
I started with that: tal:define="global count python: 0; global data python: {}" ... and I would like to do something like: tal:define="global data['jname'] python: jname" or tal:define="global null python: data['jname']=jname"
You can perform assignment that way in ZPT. First it is bad style. You really want to prepare your data inside a PythonScript, call the script from a ZPT and re-use the data as returned from the script. If you don't want follow that road, try this: tal:define="dummy python: somedict.update({key:value})" -aj