I wonder if this is a backward compatibility issue. It looks like Auth 
always sets client_side=True, so any Auth call done via Ajax will do a full 
page redirect on the client side. Does that always make sense? Should we at 
least make it configurable?

Anthony

On Monday, May 6, 2013 6:46:00 PM UTC-4, Aris Green wrote:
>
> Thanks for getting back to me so quickly.  I figured a few things out.  I 
> am using a component for users to join an email list.  I have them create 
> their users name and modify them with components loaded in the view 
> (ajax=False, ajax_trap=True).  When you add an email address and password 
> into a 2 field custom form in the view, auth.login is called in the Ajax 
> POST.  If the user successfully logs in, a form to update information is 
> returned via Ajax to the page for the user to edit and submit their 
> information.  What happens is that in gluon/tools.py, redirect is called in 
> auth.login as I pass in the name of the component (without the .load 
> extension) as the next= parameter.  There redirect is called.  This use to 
> work, but the newer functionality has broken my existing site.  Maybe I 
> should use auth.login_bare?  I'll give that a try.
>
> Was my initial solution that elegant? Probably not due to a browser 
> redirect in an Ajax call.  I guess the redirect(..., client_side=False) is 
> similar to delegating a different controller function and/or view to 
> handler the request  (e.g. Server.Transfer(...) if anyone has had to code 
> up ASP .NET).
>
> Cheers,
> Aris
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to