If you do:
Field('test1', 'reference ranking')
and then make sure the "format" attribute of the "ranking" table is set to '%(name)s', then the "test1" field will automatically get the IS_IN_DB validator you have explicitly defined below, and it will automatically get a "represent" attribute displaying the "name" value from the "ranking" table. However, if you explicitly define your own "requires" attribute, then you don't get the automatic "represent" attribute, and you have to explicitly define that as well (I think we should probably change this, though).
Anthony
On Sunday, October 7, 2012 2:44:44 PM UTC-4, dave wrote:
auth.settings.extra_fields['auth_user']= [
#Field('name', requires=IS_NOT_EMPTY()),
.
.
.
Field('test1', 'reference ranking', requires=IS_IN_DB(db, 'ranking.id', '%(name)s')),
.
.
.
On Sunday, October 7, 2012 7:37:03 AM UTC-7, Anthony wrote: