That's what I did in controller:
db.table2.field2.represent = lambda s,r: db(db.table1.id ==
s).select(db.table1.field2).first().field2
El viernes, 4 de septiembre de 2015, 22:57:27 (UTC+2), LoveWeb2py escribió:
>
> And of course I find it within a minute of posting... lol
>
> Here is my
And of course I find it within a minute of posting... lol
Here is my solution:
in model:
db.define_table('table2',
Field('field1','reference table1'),
Field('field2','reference table1', requires=IS_IN_DB(db,
db.table1.id, '%(field2)s')),
migrate=False)
in
2 matches
Mail list logo