Hi,

I'm trying to make a very simple todo application for many users. The
passwords and usernames would be given from a administrator, so hence
there wouldn't be any registration through e-mail. My problem is that
I don't know how to properly write the model/db.py file. I tried with
this, where there is one table for auth and one for the todo post, I I
just get error messages:

************************
from gluon.settings import settings
from gluon.tools import *

# if running on Google App Engine
if settings.web2py_runtime_gae:
    from gluon.contrib.gql import *
    # connect to Google BigTable
    db = DAL('gae')
    # and store sessions there
    session.connect(request, response, db=db)
else:
    # if not, use SQLite or other DB
        db = DAL("sqlite://db.db")


auth = Auth(globals(), db)
auth.define_tables()


db.define_table('todo',
    Field('time'), tha
    Field('thing'))

db.define_table(
    auth.settings.table_user_name,
    Field('password', 'password', length=512,
          readable=False, label='Password'),
    Field('registration_id', length=512,
          writable=False, readable=False, default=''))
************************

Thanks for help in advance

Reply via email to