Changes between Version 24 and Version 25 of S3/S3ReusableField
- Timestamp:
- 06/12/14 11:41:51 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3ReusableField
v24 v25 56 56 == Deactivate IS_EMPTY_OR == 57 57 58 To deactivate a '''{{{IS_NULL_OR}}}''' ('''{{{IS_EMPTY_OR}}}''')validator in the '''{{{S3ReusableField}}}''' when generating the '''{{{Field}}}''' instance, you can use the special attribute '''{{{empty}}}''':58 To deactivate an '''{{{IS_EMPTY_OR}}}''' validator in the '''{{{S3ReusableField}}}''' when generating the '''{{{Field}}}''' instance, you can use the special attribute '''{{{empty}}}''': 59 59 60 60 {{{#!python 61 resourcename = "mytable"62 tablename = "%s_%s" % (module, resourcename) 63 table = db.define_table(tablename,64 ...,65 person_id(empty=False), # inserts the person_id Field, but removes IS_NULL_OR from .requires66 61 tablename = "my_table" 62 self.define_table(tablename, 63 ..., 64 # Inserts the person_id Field, but remove IS_EMPTY_OR from .requires: 65 person_id(empty=False), 66 ...) 67 67 }}} 68 69 68 == Multiple Widgets == 70 69