yes but it wont. the redirect is bug since it creates the strings when
you instantiate the Auth class, the urls set in stone.
So
>>>auth = Auth(globals())
>>>auth.settings.controller = 'myauth'
>>>print auth.settings.login_next
'/init/default/index'
-Thadeus
On Wed, Feb 3, 2010 at 9:06 PM
I think what everyone's trying to say is that if you don't set
auth.settings.login_next then by default, the redirect after login
will be to the decorated controller that sent you to login to begin
with. So make sure there is no auth.settings.login_next in your model
file (db.py).
--
You received
It should do that if you call login via
@auth.requires_login()
On Feb 3, 4:24 pm, Dane wrote:
> Thanks!
>
> As an aside, I wonder why redirecting to the last accessed controller
> function after login isn't the default behavior. Isn't this by far the
> most common use case?
>
> On Feb 3, 2:25 pm
Thanks!
As an aside, I wonder why redirecting to the last accessed controller
function after login isn't the default behavior. Isn't this by far the
most common use case?
On Feb 3, 2:25 pm, Wes James wrote:
> You will want to do it in your controller for each view function you have.
>
> I have s
You will want to do it in your controller for each view function you have.
I have some like this:
if auth.is_logged_in():
redirect(URL(r=request,c='default',f='apage'))
or something like
@auth.requires_login()
def change_password():
return
dict(form=auth.change_password(next=URL(r=
Thanks, but I still don't understand.. if I set it in db.py, won't
that permanently send all my login redirects to the same function? But
I want the redirect to change depending on the part of the site my
users try to access. Do I use a property on request for this?
On Feb 3, 1:53 pm, Wes James w
Thanks, but I still don't understand.. if I set it in db.py, won't
that permanently send all my login redirects to the same function? But
I want the redirect to change depending on the part of the site my
users try to access. Do I use a property on request for this?
On Feb 3, 1:53 pm, Wes James w
db.py
On Wed, Feb 3, 2010 at 11:12 AM, Dane wrote:
> Thanks, and where would I set this to get a redirect to the function
> being accessed? In the body of the controller function itself? I'm new
> to python and decorators, but I assumed nothing in the decorated
> function would run.
>
>
> On Feb
Thanks, and where would I set this to get a redirect to the function
being accessed? In the body of the controller function itself? I'm new
to python and decorators, but I assumed nothing in the decorated
function would run.
On Feb 3, 10:37 am, mdipierro wrote:
> auth.settings.login_next = URL(.
auth.settings.login_next = URL(...)
On Feb 3, 12:03 am, Dane wrote:
> Hey all, I've been using the @auth.requires_login() decorator and I
> love the simplicity. It was also pretty easily to hook it into google
> account authentication after a bit of searching on this group. My only
> problem with
10 matches
Mail list logo