Oops, got it, repeating this mistake second time..
Thank you very much

On Fri, Jun 7, 2019, 12:26 PM Anthony <[email protected]> wrote:

> On Thursday, June 6, 2019 at 3:54:59 PM UTC-4, Vlad wrote:
>>
>> What could be the reason the following code wouldn't redirect to the
>> appropriate URL after login? (still brings to default/index page)
>>
>> def login_to_url():
>>
>>    auth.settings.login_next=URL(request.args(0),request.args(1))
>>
>>    logger.warning(auth.settings.login_next)
>>
>>    redirect(URL('default','user',args='login'))
>>
>>
> Above you set the login_next setting inside the login_to_url() action but
> then redirect to /default/user. The redirect results in the browser sending
> a new HTTP request to web2py, and in that new request, your setting is not
> made. Instead, maybe try:
>
> def login_to_url():
>    login_next = URL(request.args(0), request.args(1))
>    redirect(URL('default','user', args='login', vars=dict(_next=login_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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/lSvOD-GXM_k/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/1457f394-aa1a-458c-935d-e6ddf4888e24%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/1457f394-aa1a-458c-935d-e6ddf4888e24%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CABZ%2BKCB-J76xNVWRUovAY4jO9uzVeEtJW6wpXK929PXYNS%3Dp5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to