I have part of a Zope app written largely as Python scripts linking DTML forms that looks conceptually like this: 1. Form A gathers data and then as its action invokes a Python script. 2. Python Script 1 creates a new DTML document and updates its contents based on field data in Form 1. 3. Python Script 1 then uses RESPONSE.redirect() to open a second DTML form, Form 2. 4. Form 2 needs the name of the document Python Script 1 created as well as access to some or all of the data in the fields in Form 1. What is the best/right/only way to accomplish this goal? Seems like it should be straight-forward but I've played with several promising ideas that turned out to be dead ends. I'm getting a bit desperate. All help appreciated!
Hi Dan, it should be possible that you use a Session objekt for placing data between http-calls. Under Zope-2.5.1 you can have access via REQUEST.SESSION to the Session object. Before 2.5 you have other methods/products for Session objects. Regards, Dirk Dan Shafer schrieb:
I have part of a Zope app written largely as Python scripts linking DTML forms that looks conceptually like this:
1. Form A gathers data and then as its action invokes a Python script. 2. Python Script 1 creates a new DTML document and updates its contents based on field data in Form 1. 3. Python Script 1 then uses RESPONSE.redirect() to open a second DTML form, Form 2. 4. Form 2 needs the name of the document Python Script 1 created as well as access to some or all of the data in the fields in Form 1.
What is the best/right/only way to accomplish this goal?
Seems like it should be straight-forward but I've played with several promising ideas that turned out to be dead ends. I'm getting a bit desperate.
All help appreciated!
_______________________________________________ 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 )
[Dan Shafer]
I have part of a Zope app written largely as Python scripts linking DTML forms that looks conceptually like this:
1. Form A gathers data and then as its action invokes a Python script. 2. Python Script 1 creates a new DTML document and updates its contents based on field data in Form 1. 3. Python Script 1 then uses RESPONSE.redirect() to open a second DTML form, Form 2. 4. Form 2 needs the name of the document Python Script 1 created as well as access to some or all of the data in the fields in Form 1.
What is the best/right/only way to accomplish this goal?
Seems like it should be straight-forward but I've played with several promising ideas that turned out to be dead ends. I'm getting a bit desperate.
I must be missing something, because what you have asked for doesn't make sense to me. If the user is going to see the DTML document created by Python Script 1, then it's too late to use a redirect. But if the user is not going to see the document created by Python Script 1, then why create a separate document for it anyway? Why not just create the document that you want to return? You can certainly pass data from one script to another without creating an intermediate document. What's the story here? Cheers, Tom P
participants (3)
-
Dan Shafer -
Dirk Datzert -
Thomas B. Passin