[mod_python] Newbie Question

mail-lists mail-lists at peachnet.com
Thu Apr 10 15:08:51 EDT 2008

Sean Allen wrote:
> On Apr 10, 2008, at 10:40 AM, mail-lists wrote:
>> Hello,
>> I have a quick question and it might be very silly:
>> How do I pass variables between pages short of building a query string 
>> into the URL? Is there a way to set variables in the request object?
>> What I'm trying to do is the following:
>> user fills out a form
>> form calls saveform function
> when? via an onSubmit handler?

no, no JavaScript at all, sorry. I guess I wasn't  very clear. Form 
action=saveform which is a python function ( def saveform(req) )
>> input is validated
> where is the input validated? in 'saveform' that is a javascript function?

input is validated in saveform.
>> if not valid input return to the form with user values filled out.
> what exactly is 'return' here?
> from a server side script? from a javascript validation routine?
return is a util.redirect back to the form.

My question is how do I pass request variables BACK to the form short of 
  using a query string.

ie. is it possible to do something like the following:


I've tried this obviously but it doesn't work. I'm not sure if something 
like this SHOULD work because I don't quite understand whether or not 
the request object persists across the redirect.

I hope I'm asking this in the right way :)

Thank you

More information about the Mod_python mailing list