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

Daniel Tang daniel.tang@chronicle.com
Mon, 24 Feb 2003 12:34:14 -0500 (EST)


Using the expression:

<div tal:define=3D"results python:here.listProducts(type=3Drequest.form.car=
_type)"
     tal:replace=3D"nothing">stuff</div>



Gets me a TALESError in the python expression... the form is passing the
value from an input text field.  Could that have any errors in it?


--Daniel



On Mon, 24 Feb 2003, [ISO-8859-15] Geir B=E6kholt wrote:

> DT> Hello,
>
> DT> <div tal:define=3D"results python:here.listProducts(type=3D0)"
> DT>      tal:replace=3D"nothing">stuff</div>
>
> DT> I've tried this:
> DT> <div tal:define=3D"results python:here.listProducts(type=3D'string(${=
request.form.car_type})')"
> DT>      tal:replace=3D"nothing">stuff</div>
>
>
> check if this works:
> tal:define=3D"results python:here.listProducts(type=3Drequest.form.car_ty=
pe)
>
> :)
>
> --
> Geir B=E6kholt
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://mail.zope.org/mailman/listinfo/zpt
>