Version 1.61.4 (2009-04-21 10:02:50)

I had to add

auth.settings.login_url=URL(r=request,c='default',f='user',args=
['login'])

in the model to get it to go to the right controller (before, I only
had one controller :) )  But still, after logging in, I get sent to
app/default/index, not the URL I originally requested.

I put the following above the controller for the page I'm trying to go
to:

@auth.requires_login()

And put this in default.py:

def user(): return dict(form=auth())

Is there something I still need to do?

Thanks,
Scott

On May 13, 1:00 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> What you want is the default behavior of the web2py in trunk.
> Are you using 1.61.4?
>
> Massimo
>
> On May 13, 11:17 am, Scott Hunter <shun...@nycap.rr.com> wrote:
>
>
>
> > I'm trying out the Auth tool (very sweet!), and wondering if it can
> > handle the following:
>
> > I've decorated a controller/function to require a login, and auth
> > dutifully redirects me to a login page, and properly processes the
> > login.  But when I've logged in, I'd like it to go to the page I
> > originally requested, instead of default/index.
>
> > So: is there machinery in auth to do this, or is it something I'll
> > need to whip up myself?
>
> > Thanks,
> > Scott
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to