>
> db.define_table(
> 'event',
> Field('name', requires=IS_NOT_EMPTY()),
> Field('description'),
> Field('image', requires=IS_IMAGE()), # might expand this to a list
> Field('datetime', requires=[IS_NOT_EMPTY(), IS_DATETIME()]),
> Field('location'),
> Field('group_id', db.group, requires=IS_NOT_EMPTY()),
db.group hasn't been defined yet, so you are getting a key error. Either
define the event table after defining the group table, or use the
alternative syntax for specifying a reference field:
Field('group_id', 'reference group', ...)
Field('owner', [IS_NOT_EMPTY(), auth.user]),
The second argument to Field() should be the type, but looks like you're
passing a list of validators (and auth.user is not even a validator). You
probably want something like:
Field('owner', db.auth_user)
Anthony