Also, note that there's nothing special about the name "auth" -- you could
just as easily use a different name, such as:
myauth = Auth(db)
def user():
return dict(form=myauth())
Anthony
On Sunday, February 24, 2013 11:13:04 AM UTC-5, Anthony wrote:
>
> Just in case it's not clear, Auth is a callable class (i.e., it has a
> __call__ method). That means if you do:
>
> auth = Auth(db)
>
> you can then call auth() as a function (which will execute the
> __call__method).
>
> Anthony
>
> On Sunday, February 24, 2013 10:10:10 AM UTC-5, NeelSheyal wrote:
>>
>> >
>> >
>> > ('login', 'register', etc) serializes the necessary form.
>> >
>> >
>> Which portion of the Auth() class get's invoked so that the contents
>> of the form is created?
>> I am trying to trace the flow and getting lost.
>>
>> Thanks,
>> Neel
>>
>> On Sun, Feb 24, 2013 at 10:03 AM, Niphlod <[email protected]> wrote:
>> > What really happens is that on the model,
>> >
>> > from gluon.tools import Auth
>> > auth = Auth(db)
>> >
>> > then, in your controller, auth is called and inspecting request.args
>> > ('login', 'register', etc) serializes the necessary form.
>> >
>> >
>> > On Sunday, February 24, 2013 3:46:18 PM UTC+1, NeelSheyal wrote:
>> >>
>> >> Looking into the welcome app... For authentication,
>> >>
>> >> def users():
>> >> 'return dict(form=auth())',
>> >>
>> >> where is the auth() function defined? I could see that the auth object
>> >> is created in the db.py model function, what could not find the exact
>> >> function?
>> >> Can someone please explain what's happening here?
>> >>
>> >> Thanks,
>> >> NS
>> >
>> > --
>> >
>> > ---
>> > 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.
>> >
>> >
>>
>
--
---
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.