Sorry I think my language could be off and subject to misinterpretation.
I meant, I define a dict like
activities = {1:diving,2:swimming,3:skiing}
And reference it in the second table.
On Tuesday, August 21, 2012 5:24:09 PM UTC+8, lyn2py wrote:
>
> Hi guys,
>
> db.define_table('activities',
> Field('name', 'string',length=255,requires=IS_NOT_EMPTY()),
> Field('description','text'),
> format='%(name)s'
>
> )
>
> db.define_table('activity',
> Field('user_id','reference auth_user',default=auth.user_id),
> Field('activity_id','reference activities'),
> )
>
>
> Instead of the above code, can I have the second table reference a list /
> tuple instead of a table? How should I do it?
>
--