Changes between Version 20 and Version 21 of S3/S3ReusableField
- Timestamp:
- 06/12/14 11:38:08 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3ReusableField
v20 v21 10 10 11 11 {{{#!python 12 person_id = S3ReusableField("person_id", db.pr_person,12 person_id = S3ReusableField("person_id", "reference pr_person", 13 13 sortby = ["first_name", "middle_name", "last_name"], 14 14 requires = IS_NULL_OR(IS_ONE_OF(db, "pr_person.id", … … 17 17 sort=True, 18 18 error_message="Person must be specified!")), 19 represent = lambda id: (id and \ 20 [person_represent(id)] or [NONE])[0], 19 represent = pr_person_represent, 21 20 label = T("Person"), 22 comment = shn_person_id_comment,21 comment = pr_person_id_comment, 23 22 ondelete = "RESTRICT", 24 23 widget = S3PersonAutocompleteWidget()) … … 26 25 27 26 This definition does '''not''' create a '''{{{Field}}}''' instance, but just holds the parameters. 28 29 27 == Use S3ReusableFields in Table Definitions == 30 28