[ZPT] How do I use form variable to pass as a parameter to a python script?

Chris Withers chrisw@nipltd.com
Mon, 24 Feb 2003 17:14:28 +0000

Daniel Tang wrote:
> <div tal:define="results python:here.listProducts(type='string(${request.form.car_type})')"
>      tal:replace="nothing">stuff</div>

Your syntax is badly munged, try this:

<div tal:define="results python:here.listProducts(type=request.form.car_type)"
 >      tal:replace="nothing">stuff</div>



PS: You can only use one types of TALEs expresion at one time, you were 
originally trying to use a mix of python expression and string substitution 
expression syntax at the same time.