Thanks very much Anthony, I didn't know this feature.
2012/5/31 Anthony :
> db.class_attendant.person_id.requires = IS_IN_DB(db(db.person.age >= 18),
>
> 'person.id', '%(name)s %(surname)s')
>
> The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather
> than an entire db conn
db.class_attendant.person_id.requires = IS_IN_DB(db(db.person.age >= 18),
'person.id', '%(name)s %(surname)s')
The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather
than an entire db connection. See
http://web2py.com/books/default/chapter/29/7#Database-validators.
Antho
2 matches
Mail list logo