models/db.py
db = DAL(.....)
from gluon.tools import Auth
auth = Auth(db).define_tables()
# if forst time running create the new user
if db(db.auth_user).isempty():
password = CRYPT()("12345")[0]
db.auth_user.valdiate_and_insert(first_name="default",
last_name="default",
email="[email protected]",
password=password)
# automatically login the user
user = auth.login_bare("[email protected]", "12345")
--
---
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.