On Mar 9, 2011, at 1:22 PM, DenesL wrote:
> 
> plus the decoration of index:
> @auth.requires_login()
> 
> On Mar 9, 11:04 am, Jonathan Lundell <jlund...@pobox.com> wrote:
>> On Mar 9, 2011, at 5:00 AM, DenesL wrote:
>> 
>> 
>> 
>>> I did use -I but it did not show any redirects.
>>> Anyway, I still don't know why it gets redirected to profile when it
>>> is not properly defined.
>> 
>> What was the minimum you needed to do to get the redirection? Just the 
>> double-form version of user?

OK, I tracked it down.

The normal call, form=auth(), is dynamic (see Auth.__call__), and returns the 
form that's appropriate to the request URL. Auth.register() does a redirect to 
profile if the user is logged in. 

We don't see that with curl, because curl isn't providing the cookie that would 
connect us to the login session.

Short answer: if you're going to use Auth, use it in the normal way; don't try 
to call the individual form generators. They have too many side effects to be 
used outside their standard context.

Reply via email to