[Zope] Calling DTML from a python script

Chris Meyers chris@hddesign.com
Thu, 1 Nov 2001 19:53:47 -0600


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