[Zope] Dictionary in ZPT

Pascal Peregrina Pperegrina at Lastminute.com
Wed Sep 27 07:51:16 EDT 2006


Hi,

I am not sure about your use case, but this should work:

...
tal:define="global count python: 0; global data python: {}"
...
tal:define="null python: data.update({'jname':jname});"
...

Pascal

> De : Alan <alanwilter at gmail.com>
> Date : Tue, 12 Sep 2006 14:16:23 +0100
> À : <zope at zope.org>
> Objet : [Zope] Dictionary in ZPT
> 
> 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"
> 
> But I get only error.
> 
> Is there a way of creating and increasing a dict inside Zope template page?
> 
> Many thanks in advance.
> 
> Cheers,
> Alan
> 
> -- 
> Alan Wilter S. da Silva, D.Sc. - Research Associate
> Department of Biochemistry, University of Cambridge.
> 80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>> http://www.bio.cam.ac.uk/~awd28<<
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


More information about the Zope mailing list