Hi,

I suppose that this is a very elementary question, but I can't find
the solution. My question is -- how to make a account for each user?

I've tried with this code, but it gives just one account for all user:

==on the model file==
db.define_table(
   auth.settings.table_user_name,
   Field('username'),
   Field('password'),
   Field('registration_key', default=''))
auth.define_tables()
custom_auth_table = db[auth.settings.table_user_name] # get the
custom_auth_table
db.define_table('day',
       Field('person', db[auth.settings.table_user_name]),
       Field('thedate','date'),
       Field('value', 'integer'))

==in a controller file==
@auth.requires_login()
def create():
       some code

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

Reply via email to