Actually, why do you need the "events" field in group_of_events? If you
want a one-to-many relation with db.event, you've already got it with the
db.event.group_id field. What workflow are you trying to create?
Anthony
On Wednesday, June 27, 2012 12:09:50 PM UTC-4, Alec Taylor wrote:
>
> Thanks, that fixed some other problems, but my initial problem of not
> getting the list of events associated with each group is still
> present.
>
> >> db.define_table(
> >> 'group_of_events',
> >> Field('group_name', requires=[IS_NOT_EMPTY(), IS_NOT_IN_DB(db,
> >> 'group_of_events.group_name')]),
> >> Field('events', 'list:reference db.event', requires=[IS_IN_DB(db,
> >> 'event.id', '%(event_name)s [%(group_id)s]', multiple=True)])
> >
> >
> > When you put the IS_IN_DB validator in a list, you do not get the
> standard
> > dropdown (for single items) or multiple select widget (for multiple
> items).
> > Change the above to:
> >
> > requires=IS_IN_DB(db, 'event.id', '%(event_name)s [%(group_id)s]',
> > multiple=True)
> > Anthony
> >
> > --
> >
> >
> >
>
--