And you can make things even easier by specifying the "format" attribute of
the t_itemtypes table, which will give you a default IS_IN_DB validator (as
well as a default "represent" attribute) on any fields that reference the
table:
db.define_table('t_itemtypes',
That was the answer. Thanks for the help.
Bill Lugg
On Saturday, October 24, 2015 at 9:01:40 PM UTC-6, DenesL wrote:
>
>
> The second argument of IS_IN_DB should be the key to the reference.
> And the third should be a format string to represent that key.
>
> So your models should look
I just did this and it works great. The format attribute was already
there, but set to f_itemtype. I just didn't realize what it was there
for. Now I understand.
Thanks for the help.
Bill Lugg
On Thursday, October 29, 2015 at 5:55:57 PM UTC-6, Anthony wrote:
>
> And you can make things even
The second argument of IS_IN_DB should be the key to the reference.
And the third should be a format string to represent that key.
So your models should look something like
db.define_table('t_itemtypes',
Field('f_itemtypedesc_string', 'string'),
)
db.define_table('t_items',
4 matches
Mail list logo