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

Dieter Maurer dieter@handshake.de
Mon, 24 Feb 2003 21:13:19 +0100


Daniel Tang wrote at 2003-2-24 11:58 -0500:
 > I would like to use a form variable from the previous page to pass to a
 > python script.
 > 
 > 
 > Example:
 > 
 > <div tal:define="results python:here.listProducts(type=0)"
 >      tal:replace="nothing">stuff</div>
 > 
 > I want to call a python function with input from the form variable
 > car_type instead of the value 0 (from the previous page).
 > 
 > <form name="testname" action="nextpage" method="post">
 > <input type="text" name="car_type">
 > <input type="submit" name="submit" value="Go">
 > </form>

  <div tal:define="results python:here.listProducts(type=request.car_type)"


Dieter