Hello Annet,

I have set the URLs as you did in db.py, in my case:

auth.settings.login_url=URL(r=request, c='default', f='user/login')
auth.settings.login_next=URL(r=request, c='default', f='index')
auth.settings.logout_next=URL(r=request,c='default',f='index')

I think I do not need the first line because @auth.requires_login
exposes that url (user/login). The only diference with your code is
the first line.


In default.py I have the following functions

def index():

    return dict(mensaje="Hola")

@auth.requires_login()
def test():

   return dict(mensaje="test")

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


when I try to go to http://127.0.0.1:8000/example/default/test web2py
redirects me to http://127.0.0.1:8000/example/default/user/login.
After a successful login web2py does not redirect to
http://127.0.0.1:8000/example/default/index

I have changed auth.settings.login_next=URL(r=request, c='core',
f='index') several times to other controllers but redirection does not
work. I can't understand what I'm doing wrong.

Thank you for your patience!

Salva
--~--~---------~--~----~------------~-------~--~----~
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