Returning an html page using a python script
Is there an equivalent way of doing the following dtml in a python script (but not using a REQUEST.RESPONSE.redirect)? <dtml-return expr="editForm(_.None, _, message='Saved', DictionaryOfInfo=dict_of_info) Using: return editForm, returns the html not the actual page. Plus I want to pass misc info to the page but not as the query string. Thanks for any ideas to point me in the right direction. Richard
Steve Nicholson wrote:
Is there an equivalent way of doing the following dtml in a python script (but not using a REQUEST.RESPONSE.redirect)?
<dtml-return expr="editForm(_.None, _, message='Saved', DictionaryOfInfo=dict_of_info)
This should do the same from a Python script: return context.editForm(context, context.REQUEST, message='Saved', DictionaryOfInfo=dict_of_info) regards Max M ><evolve> > >
1. Create a python script with the parameters you'll use, at the Parameters list 2. Try this script: editForm = context.editForm print editForm(fill parameters values here) return printed Ausum ----- Original Message ----- From: "Steve Nicholson" <yahoogroups@yoursolutions.com> To: "Zope Mailing List" <zope@zope.org> Sent: Monday, September 02, 2002 6:53 AM Subject: [Zope] Returning an html page using a python script
Is there an equivalent way of doing the following dtml in a python script (but not using a REQUEST.RESPONSE.redirect)?
<dtml-return expr="editForm(_.None, _, message='Saved', DictionaryOfInfo=dict_of_info)
Using: return editForm, returns the html not the actual page. Plus I want to pass misc info to the page but not as the query string.
Thanks for any ideas to point me in the right direction.
Richard
_______________________________________________ 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 )
Ausum Studio wrote:
1. Create a python script with the parameters you'll use, at the Parameters list
2. Try this script:
editForm = context.editForm print editForm(fill parameters values here) return printed
I'd go with Max's version ;-) Chris
participants (4)
-
Ausum Studio -
Chris Withers -
Max M -
Steve Nicholson