On Wed, 2003-11-19 at 02:20, Geir Bækholt wrote:
On Wed, 19 Nov 2003 10:03:43 +0000 GMT RI Dunfey asked the Zope mailinglist about the following:
It works fine with regards to running the SQL but if the resulting page is refreshed it runs the SQL again. How do I avoid this? If I cange the URL I figure it avoids this problem but dont know how to do this?
http-redirect from the script to your template at (4). context.REQUEST.RESPONSE.redirect(context.4yourPageTeplate.absolute_url())
This answers your question, but I doubt it will solve your problem... you'll just have the same issue at a new address. Since your refreshed POST will be identical to the original, you'll have to solve this server-side. One thing you could do is use a session variable to associate a user cookie with the last time they ran your query. Then make your Python script check for this value and return None when not enough time has passed. HTH, Dylan