multiple = (1, db.test1.id) The second value of the tuple should be an integer representing the maximum number of allowed values. It cannot be a Field object, and I'm not sure what you are trying to achieve with that.
Anthony On Tuesday, November 3, 2015 at 7:59:07 PM UTC-5, 黄祥 wrote: > > just confirmation : > is this right (the example : multiple = (1, x) ) ? > e.g. when try to use x in above example it return an error NameError: global > name 'x' is not defined > db.define_table('test0', > Field('test1', 'list:reference test1'), > format = '%(test1)s') > > db.test0.test1.requires = IS_IN_DB(db(), db.test1.id, db.test1._format, > multiple = (1, db.test1.id) ) > > thanks and best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.