AW: [ZPT] Parameter to a python script?
Fri, 25 Jan 2002 18:32:47 +0100
this was it.
Hmm, maybe you should add a little remark in the "Tutorial Part 4 --> using
like "don't forget to set the parameter in the Parameters field"!
for all these who never used a python script with parameters before :)
Von: Evan Simpson [mailto:email@example.com]
Gesendet: 25 January 2002 16:59
An: Damir Bartakovic
Betreff: Re: [ZPT] Parameter to a python script?
Damir Bartakovic wrote:
> Therefore I am calling
> <span tal:replace="python: here.display_sex(result.pers_sex)"></span>
> Since I am not very common with python and scripts. In which way I can
> access the variable within the script?
You need to declare the parameter by placing it in the "Parameters"
field of the Script. In this case, you could set the parameters of your
"display_sex" Script to "sex", and use that name to refer to it in the
body of the Script. Your call above should work fine once you have done
Evan @ Zope