further investigation...
away from CAS...
in default.py:
def one():
redirect(URL(f='two', anchor='anchor987654321'))
def two():
redirect(URL(f='three'))
def three():
return dict(message='three!')
when I enter http://127.0.0.1:8000/init/default/one the function two()
is called and I'm redirect to
http://127.0.0.1:8000/init/default/three#anchor987654321
ie... Web2py has "cleverly" retained the anchor set by the redirect
when one() is called.
redirects via CAS appear to "stomp" on anchors - anyone know why?
On Jun 18, 10:38 am, Carl <[email protected]> wrote:
> an example:
>
> if a user, not yet logged in, clicks the
> linkhttp://127.0.0.1:8000/init/default/account#Invite
> they are asked to log in and then redirected
> tohttp://127.0.0.1:8000/init/default/accountd
> note that the hash (#Invite) is lost.
>
> I'm using CAS in my app.
>
> Has anyone encountered this?
>
> On Jun 17, 9:46 pm, Carl <[email protected]> wrote:
>
>
>
>
>
>
>
> > The anchor text of URLs is lost when I'm redirected to login and then
> > on to "next.
>
> > I think it's down to gluon.py requires_login()
> > this code:
>
> > next = URL(r=request,args=request.args,
> > vars=request.get_vars)
> > ...
> > self.settings.login_url + '?_next='+urllib.quote(next)
> > ///
>
> > I think URL() creates an url but doesn't added any existing anchor
> > text.
>
> > thoughts, any one?