This example is given in the validators section of the book:
requires = [IS_INT_IN_RANGE(0, 8), IS_IN_SET([2, 3, 5, 7],
error_message='must be prime and less than 10')]
It does not seem to work. If I attempt to combine IS_IN_SET with any
other validator, the dropdown list doesn't work.
db.define_table('plan',
Field('id','id'),
Field('option',type='string',label=T('Subscription Options')),
format='%(option)s',
migrate=settings.migrate)
db.define_table('subscription',
Field('id',
Is there any way to use the IS_IN_SET validator zero option with a db field
that is tied to a lookup table? For example, if I have
db.define_table('plan',
Field('id','id'),
Field('option',type='string',label=T('Subscription Options')),
format=
i have the model
db.define_table( 'foobar',
Field('open', 'boolean', requires = IS_IN_SET([(True, 'open'),
(False, 'closed')], zero = None), default = True,
widget=SQLFORM.widgets.radio.widget),
)
and the controller
def edit():
return crud.update(db.foobar, request.args(0), deletable = Fal
Hi ,
I have a database which contains a list:string field type and a
requirement to be in a set of value ( with IS_IN_SET AND multiple=True
) . My question is how would you dynamically generate this set( my
categories are stored in another table ) ? What i am trying to do is
to allow user to sel
5 matches
Mail list logo