You can't, but you can. It depends on what your other requirements are. Here's three suggestions: 1) Don't redirect. Render the ZPT direction in the python script. This will show the python scrpit in the clients browser window, but is most secure and will have the best performance (since there is no round trip to the client). 2) Use a session. Stuff the data into the session object, redirect, and pray it's there when the second page gets requested. This makes me nervous for some reason, probably because the whole notion of sessions is nebulous for the web. 3) Embed the data into the redirect URL. If it's small enough, you could just tack them on as GET style arguments. This has the disadvantage of exposing said data directly to the user and will have problems with even moderate amounts of data. Even better, why not make the ZPT the target of the form, then call your SQL stuff from the form? Your solution seems rather roundabout to me.
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chetan Kumar Sent: Tuesday, August 20, 2002 11:45 AM To: zope@zope.org Subject: [Zope] Redirect with results of script to another ZPT
Hi all
The situation
------------------OneZPT------------------ <FORM action SomePythonScript> selections </FORM> -----------------------------------------
---------------SomePythonSript----- results=SomeSQL(pass selections from OneZPT> RESPONSE.redirect(AnotherZPT) -----------------------------------------
I need to get the results in AnotherZPT.
-------------AnotherZPT-------------- <table> <tr somehow get the results from SomePythonScript triggered by OneZPT> <td> display here </td> </tr> </table> ----------------------------------------- What is the way out ?
This is a compromise solution for my requirements. Earlier, I wanted to return the results to OneZPT where I would have rendered. This seems to be a bit tricky to me at this moment.
TIA Chetan
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )