On Sun, May 24, 2009 at 3:16 PM, Pynthon Pynthon <forumx...@gmail.com>wrote:
> Hello > > I'm getting confused. Can someon explain this code? > > redirect(URL(r = request, f = "first")) > > I know it says redirect to a function. But why the URL and why the r = > request. I can't find anything in the book about it. If you don't have the manual, then http://www.web2py.com/examples/static/cookbook.pdf shows on page 20 what you want. Also see: - follow the URL link on http://www.web2py.com/examples/default/api - the various examples at http://www.web2py.com/examples/default/examples For an example of what is held in request, see http://www.web2py.com/examples/simple_examples/hello6, and note the values of: request.application request.controller request.function request.args request.vars (These are listed alphbetially, so you'll have to make it past all the request.cookies, and requiest.env items) Note: since URL accespts a request structure, you can save one / forward one / use one to return later (or any portion of). > > Thanks, > Pynthon > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---