On Mar 8, 6:03 am, pk <peter.kirch...@youngdesigners.de> wrote: > hi massimo, > > the problem is if i click the link logout, i get redirected to the > link: ...user/profile > but this is wrong! i will redirected to the index page > > On 8 Mrz., 00:15, Massimo Di Pierro <massimo.dipie...@gmail.com> > wrote: > > > Hello pk, > > > I do not fully understand the problem. I understand the code but not > > your workflow. Can you exaplain what you click on and what you expect > > and what you get? > > > On Mar 7, 4:59 am, pk <peter.kirch...@youngdesigners.de> wrote: > > > > hi together, > > > > i have a problem with a redirection. i will not redirected to this > > > link! > > > in my view i have this: <li class="blue"><a href="{{=URL(r=request, > > > c='default', f='user/logout')}}"><span>logout</span></a></li> > > > > my main-controller: > > > @auth.requires_login() > > > def index(): > > > return dict(message="main/index") > > > > default-controller: > > > def index(): > > > if auth.is_logged_in(): > > > redirect(URL(r=request, c='main', f='index')) > > > return dict(message="index")
next action should be just: def user(): return dict(form=auth()) but I don't understand how your change causes it to redirect to /default/user/profile which it does indeed (tested). > > > def user(): > > > loginform=auth.login() > > > registerform=auth.register() > > > return dict(loginform=loginform, registerform=registerform) > > > > but always after clicking the link i get this redirection! > > > hope somebody of you can help me?!? > > > > thanks peter > >