Re: [Zope] default webpage after External Method script executed
Thanks a lot for your reply. Both ways worked for me with a little modification, I had to remove 'context'. return self.Status.index_html(**options) return self.REQUEST.RESPONSE.redirect('index_html?submit=ok') Cheers! Alan On 20/07/06, Andreas Jung [EMAIL PROTECTED] wrote: --On 20. Juli 2006 20:48:16 +0200 Tino Wildenhain [EMAIL PROTECTED] wrote: return self.context.REQUEST.RESPONSE.redirect(some_url_plus_query_string) valid but very ugly. Why not just return the result of the call of a template? You might be interested have the original page under the original URL. So a redirection is fine. e.g. return self.zpt_or_whatever_template() Or do all the form work in a python script anyway, which calls the external method when everything looks ok and returns with the template as above. THis also work...depends on your usecase and requirements -aj -- Alan Wilter S. da Silva, D.Sc. - Research Associate Department of Biochemistry, University of Cambridge. 80 Tennis Court Road, Cambridge CB2 1GA, UK. http://www.bio.cam.ac.uk/~awd28 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] default webpage after External Method script executed
Hi! My simple webpage for submitting files is ok. It calls a External Method script to do all the dirty job. However, I am running out of ideas of how to get back to my default submitting web page after submitting a file (and thus execute the script). Any idea would be very welcome. Thanks in advance. Cheers, Alan -- Alan Wilter S. da Silva, D.Sc. - Research Associate Department of Biochemistry, University of Cambridge. 80 Tennis Court Road, Cambridge CB2 1GA, UK. http://www.bio.cam.ac.uk/~awd28 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] default webpage after External Method script executed
--On 20. Juli 2006 19:25:11 +0100 Alan [EMAIL PROTECTED] wrote: Hi! My simple webpage for submitting files is ok. It calls a External Method script to do all the dirty job. However, I am running out of ideas of how to get back to my default submitting web page after submitting a file (and thus execute the script). return self.context.REQUEST.RESPONSE.redirect(some_url_plus_query_string) -aj pgpSGGK9SkNCV.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] default webpage after External Method script executed
Andreas Jung wrote: --On 20. Juli 2006 19:25:11 +0100 Alan [EMAIL PROTECTED] wrote: Hi! My simple webpage for submitting files is ok. It calls a External Method script to do all the dirty job. However, I am running out of ideas of how to get back to my default submitting web page after submitting a file (and thus execute the script). return self.context.REQUEST.RESPONSE.redirect(some_url_plus_query_string) valid but very ugly. Why not just return the result of the call of a template? e.g. return self.zpt_or_whatever_template() Or do all the form work in a python script anyway, which calls the external method when everything looks ok and returns with the template as above. While I wonder what the mentioned dirty work really is... Regards Tino ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] default webpage after External Method script executed
--On 20. Juli 2006 20:48:16 +0200 Tino Wildenhain [EMAIL PROTECTED] wrote: return self.context.REQUEST.RESPONSE.redirect(some_url_plus_query_string) valid but very ugly. Why not just return the result of the call of a template? You might be interested have the original page under the original URL. So a redirection is fine. e.g. return self.zpt_or_whatever_template() Or do all the form work in a python script anyway, which calls the external method when everything looks ok and returns with the template as above. THis also work...depends on your usecase and requirements -aj pgpRqvlSRhwzV.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )