On Saturday, November 14, 2015 at 11:38:32 PM UTC-5, sandeep wrote: > > hii all, > how can i redirect from the registration page to another page* instead > of login page* after completion of registration. I am using default > registration from web2py >
auth.settings.register_next However, out of the box, that will only work if the user goes directly to the register page. If instead the user tries to go to a page that requires login, they will be redirected to the login page, which will add a _next variable to the URL. If they then click the register button, that _next variable will persist in the URL, and ultimately they will be redirected back to the originally requested page after registration. If you need to short circuit this behavior, you can (a) change the "register" button in the default/user.html view so it eliminates any _next variable, (b) generate/process the registration form by explicitly calling auth.register(next=some_url), or (c) when the register function is requested, delete request.vars._next. Anthony -- 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/d/optout.