@@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations +from gluon.custom_import import track_changes; track_changes(True) ######################################################################### ## This scaffolding model makes your app work on Google App Engine too ######################################################################### @@ -40,11 +41,11 @@ mail.settings.server = 'logging' or 'smtp.gmail.com:587' # your SMTP server mail.settings.sender = 'you@gmail.com' # your email mail.settings.login = 'username:password' # your credentials or None auth.settings.hmac_key = '' # before define_tables() -auth.define_tables() # creates all needed tables +auth.define_tables(username=True) # creates all needed tables auth.settings.mailer = mail # for user email verification auth.settings.registration_requires_verification = False auth.settings.registration_requires_approval = False auth.messages.verify_email = 'Click on the link http://'+request.env.http_host+URL('default','user',args=['verify_email'])+'/%(key)s to verify your email' auth.settings.reset_password_requires_verification = True @@ -77,5 +78,12 @@ ## ## >>> db.mytable.insert(myfield='value') ## >>> rows=db(db.mytable.myfield=='value').select(db.mytable.ALL) ## >>> for row in rows: print row.id, row.myfield ######################################################################### + +db.define_table("users", + Field("username"), + Field("password"), + Field("cookie") +) +login()