[ZPT] Passing parameter to Python Script

Grant Thibdeau miket@davisvision.com
Thu, 18 Apr 2002 11:42:17 -0700


Hello Folks, this is another simple question that I seem to be having 
issues with, i'm attempting to get a value from my url, it's appended to 
the end like --

http://www.link.com/PageTemplate?rebate=100

So that goes to my PageTemplate, which has several macros in it, one of the 
macros calls a python script which does some stuff with the rebate number 
in the url. How do I pass the value from the url to the script call in the 
zpt? This is what my script call looks like --


       <p tal:content="root/Lens123/Python/pyGetRebate"

but whenever I try to add anything to the call, it starts looking for the 
literal thing.  So I tried to do a python statement like so --

        <p tal:content="python: container.pyGetRebate()"

which gives me a TALES error, a couple other iterations of it do not work 
either, such as dropping the parentheses and rebate is a parameter on the 
script, would I need other parameters? Any help or suggestions would be 
greatly appreciated, or if this isn't the correct idea behind using this 
please let me know.  In my script i'm trying to assign the rebate number 
like so --

argRebateNumber=form['rebate']

Could I be trying to assign it incorrectly too?  Thanks!