On 10 Jan 2014, at 12:16 AM, Tarun Kumar <reach.tarun.h...@gmail.com> wrote: > Hi! people I am new to web2py and web development. I am a bit confused about > the request object. In its variables which can be accessed by > request.vars.variable_name are the values stored only for the most recent > request or for all the past requests. > Considering the example given in web2py book overview section in which we use > action attribute of the form and in the second function retrieve the visitors > name using request.vars.visitor_name. My question is now that after a > redirect to some other page will request.vars.visitor_name still be > accessible?
Request is only the current request. request.vars is a dictionary representing the URL's query string. If you want request.vars.visitor_name to be visible after a redirect, you must include it in the query string of the URL you're redirecting to. Alternatively you could store the visitor_name in session, making it visible to subsequent requests. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.