Re: passing parameters from index() to POST method
Rob Fowler <legal-1+f/[email protected]> Thu, 04 Mar 2010 11:47:52 +1100
| Newsgroups | gmane.comp.python.mod_python |
|---|---|
| Message-ID | <[email protected]> |
From my earlier example, it was not called twice. I made it called twice as suggested here. Maybe this is more clear: Ideally I simply want to have an index function to set the stuff up and show the form and another function that gets called when the client does the post (the easy bit) but I want some variables that are set up in the index to be present in the function called on post. Is there a standard way to post variable between the handler and the post functions? On 4/03/2010 11:41 AM, Graham Dumpleton wrote: > On 4 March 2010 11:27, Rob Fowler<legal-1+f/[email protected]> wrote: > >> Although that works fine and will call my post function, the apache server >> calls the handler a second time so all the local variables are new. >> > You better explain that a bit better. The handler function should not > be called multiple times for the same request. > > Dump out req.uri to see what URL is being accessed on each call. They > may actually be two separate requests. This can occur where a web > browser keeps requesting a favicon.ico and it doesn't exist. > > Graham > >