[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2016-05-26 Thread Val K
Hi! As I understand *requires() * designed to decorate and *back* redirection after login, so it ignores *auth.settings.login_next * If you want to redirect after login just do it from your *check_condition()* directly On Thursday, May 26, 2016 at 5:15:15 PM UTC+3, 黄祥 wrote: > >

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2016-05-26 Thread 黄祥
follow the instruction is working well, thank you, but when i tried to add the condition it didn't work. e.g. *controllers/default.py* *"""* *not work because of this* *def check_condition(): * *auth.settings.login_next = URL('user/profile')* *if request.function != 'user':* *

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2014-11-10 Thread WhoSoLovesUs
Is this still the recommended way to send logged in users to a particular page? I was looking for how to send my logged in users to a particular page, and eventually found this thread after a fair bit of time searching. So I'm just echoing a desire to see this (I suspect) very common case

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2014-11-10 Thread WhoSoLovesUs
PS ... Glad to find this though at least, and thank you to everyone involved in the thread! I am a beginning user, and I'm starting at the beginning of my app's most fundamental needs (in this case of course, logging in, and what a user will see when they do so) On Thursday, December 6,

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-12-06 Thread Kostas M
Peter, I agree with you 100% regarding the ambiguous documentation, and the lost time back and forth, among google searches and source code reading... I am one of them! Kostas 'These must point to the URL you want to redirect your users to after the various possible auth actions (in

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-18 Thread peter
Rob, the the 'referrer_actions=None' as a navbar means that the login_next is followed. So the 'auth.next=None' is no longer needed. So the instructions should be # - - - - - - - - - - - - - - - - - - # RAM START - # Instructions: Copy all of this into your db.py, and make the one change in

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-18 Thread Rob_McC
Hey thanks Peter. I changed it, tested it, all is 100%. Rob --

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-17 Thread Anthony
Sorry, I didn't look closely at your code. You said you added auth.navbar(referrer_actions=None) to your db.py file, but that's not where it goes. auth.navbar() is a helper that generates HTML, so it goes in a view. By default, it is included in layout.html, and if you actually have the navbar

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-17 Thread Rob_McC
Anthony: Thanks... I appreciate everyone's help on this thread. I did what you suggested. and I now have it working (perfectly- I think) . I added 2 lines to db.py and inserted into layout.html referrer_actions=None as shown in detail below. I also learned how to redirect a user, after

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-16 Thread Rob_McC
Thanks ! I spend some more time wrestling with this, and expanding my knowledge of this feature of web2py, which I enjoy doing. *GOOD NEWS*, I finally got it to work, on a simple web2py app. - just by adding 2 lines in the right place. (copy of working code below) Now, I'm not sure if a bug

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-16 Thread Anthony
How does someone arrive at your login page? Is it via the Login link generated by the auth.navbar()? Anthony On Friday, November 16, 2012 10:42:48 AM UTC-5, Rob_McC wrote: Thanks ! I spend some more time wrestling with this, and expanding my knowledge of this feature of web2py, which I

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-16 Thread peter
I have already issued a bug report. for auth.navbar(referrer_actions=None) Peter On Friday, 16 November 2012 18:03:12 UTC, Anthony wrote: How does someone arrive at your login page? Is it via the Login link generated by the auth.navbar()? Anthony On Friday, November 16, 2012 10:42:48 AM

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-16 Thread Rob_McC
Hey Anthony: Q How does someone arrive at your login page? Is it via the Login link generated by the auth.navbar()? A: I have tested a few ways... here are my findings *Method 1* - From home page, http://127.0.0.1:8000/AuthRedirect/default/user/login?_next=/AuthRedirect/default/index

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-15 Thread peter
Instead, perhaps we can just improve the documentation. Yes, it would be great if the documentation were changed to something like your explanation below, but clearer on the navbar bit. I believe you concluded back in July that the documentation could be clearer. you just have to set the

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-15 Thread Anthony
auth.navbar(referrer_actions=None) did not work for Rob or for myself. If that's the case, then please submit an issue in Google Codehttp://code.google.com/p/web2py/issues/list, as that would be a bug. Thanks. Anthony --

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-14 Thread peter
You are not the only person to have wasted a lot of time on this issue. There iso many issues that the Web2py team are excellent on, but this is not one of them. 'auth.navbar(referrer_actions=None)' Also did not work for me with 2.2.1 however putting 'auth.next = None' did work. In the

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2012-11-14 Thread Anthony
If setting auth.user.settings to a URL stopped the bit of code that generates _next when default/user/register is 'called' then it would seem to fit in with developers expectations. Keep in mind, currently it is possible to enable referrers (i.e., the _next parameter in the URLs) while