[ZPT] Re: zpt + python + variables

Casey Duncan casey at zope.com
Wed May 5 10:19:54 EDT 2004


On Wed, 5 May 2004 08:01:40 -0400
Michael Bond <mbond at the-forgotten.org> wrote:

> 
> I have a zpt form, where I am generating some of the input fields on 
> the fly in the zpt. Not only will the names of the field change, but 
> the number of fields will change as well.
> 
> The action attribute points to a python script, however everything
> dies at this point because the python script needs an expected number
> of parameters and complains if it doesn't have exactly that.
> 
> What is the best way to handle a problem like this? Is there a way to 
> ignore the parameter's list in the script definition and have the zpt 
> send something else through to the script (perhaps a dict.)?

Yes, but you need to be more specific. What are the expected arguments
for the script?

It is possible have variable argument lists for scripts. Does the python
script specify the fields somehow? How is it being used exactly?

-Casey




More information about the ZPT mailing list