Calling DTML from a python script
My situation is this: I have a form that users fill in any or all textboxes. They then click the submit button which calls a python script which gets the information from context.REQUEST and builds an XML statement along with some other stuff. The script then calls a ZSQL method which inserts this XML and other stuff into a requests storage database table. I would then like my python script to call a DTML Document which will display the results of a query of a different table based on the info the user had input, which is where I am running into problems. My calls to the DTML Document are failing. I have tried the method suggested on this list a couple of days ago: return context.zopeObject(REQUEST=context.REQUEST) but that isn't working for me because the DTML document I am calling is one folder down from my python script so the document gets lost when it tries to get some of its necessary information in the parent folder. I have also tried using setVirtualRoot, but that isn't working either. So now I have to ask for help. How do I call a DTML Document from a python script when the Document is in a subfolder of the folder holding the script? Thanks in advance for the help Chris Nobody will ever go campin' with a Nitro Burnin' Funny Car -- Dead Milkmen
Figured this out with the help of ZopeLabs (http://www.zopelabs.com/). To call a DTML Document w/ a python script, use: return context.zopeObject(context,context.REQUEST) Chris On Thu, Nov 01, 2001 at 07:53:47PM -0600, Chris Meyers wrote:
My situation is this: I have a form that users fill in any or all textboxes. They then click the submit button which calls a python script which gets the information from context.REQUEST and builds an XML statement along with some other stuff. The script then calls a ZSQL method which inserts this XML and other stuff into a requests storage database table. I would then like my python script to call a DTML Document which will display the results of a query of a different table based on the info the user had input, which is where I am running into problems.
My calls to the DTML Document are failing. I have tried the method suggested on this list a couple of days ago:
return context.zopeObject(REQUEST=context.REQUEST)
but that isn't working for me because the DTML document I am calling is one folder down from my python script so the document gets lost when it tries to get some of its necessary information in the parent folder. I have also tried using setVirtualRoot, but that isn't working either. So now I have to ask for help. How do I call a DTML Document from a python script when the Document is in a subfolder of the folder holding the script?
Thanks in advance for the help Chris
Nobody will ever go campin' with a Nitro Burnin' Funny Car -- Dead Milkmen
_______________________________________________ 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 )
No-one will ever buy a present for a Nitro Burnin' Funny Car -- Dead Milkmen
participants (1)
-
Chris Meyers