[Zope] ZPT to Python(script) to a different page

Chris Withers chrisw@nipltd.com
Fri, 18 Jul 2003 15:42:40 +0100


AdvertisingDept wrote:
> Newbie requests Style help please...

[snip]

What I'd do is actually have a Python Script being the driver for all this...

> If the validation fails, as it will on the
> first ZPT rendering, the script
> returns the validation errors and
> the user is still on the originating ZPT 
> containing the form.

Here the python script returns the ZPT form with something like:

return context.your_form()

> If the validation fails, due to bad
> input, the script returns the validation
> errors and the user is still on the 
> originating ZPT.

Likewise here:

return context.your_form()

> If the validation passes,
> I would like the user's browser
> to display different ZPTs based on 
> the script's decision logic.

And here you can do your other ZPTS:

return context.your_other_zpt()

...just have your form submit to the python script :-)

cheers,

Chris