I'm reading through the tutorial and just came across the part that
adds the code:

from gluon.tools import Auth
auth = Auth(db)
auth.define_tables()

def user():
    return dict(form=auth())

And suddenly login, register, etc were enabled. This is the first
"magic" I've come across in web2py that I don't understand well. I
understand that auth.define_tables() creates the tables for the user
data, but I'm not sure how def user():... suddenly adds all the
registration and login pages.

Could someone give me a quick walkthrough of what's going on?

Reply via email to