Awesome! It works nicely now. Thanks!

On Aug 17, 1:37 pm, mdipierro <[email protected]> wrote:
> I think you want to set in db.py
>
> auth.settings.controller = 'c'
>
> On Aug 17, 1:00 am, Adi <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I'm on web2py 1.82 and I'm facing this issue:
>
> > I have a custom controller c in which I have these functions and
> > corresponding views:
>
> > c.py
> > -----
> > @auth.requires_login()
> > def index():
> > # index page stuff
>
> > def login():
> > form=auth.login()
> > return dict(form=form)
>
> > db.py
> > -------
> > if request.controller == 'c':
> >     auth.settings.login_url = URL(request.application, 'c', 'login')
>
> > Now this works as expected, except when user enters incorrect login
> > credentials. In this case web2py redirects user to default/login and
> > that gives "invalid function" error.
>
> > How do I tell web2py to open the login form specified in
> > auth.settings.login_url in case of error?

Reply via email to