Changes between Version 22 and Version 23 of S3/S3ReusableField


Ignore:
Timestamp:
06/12/14 11:40:13 (7 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3ReusableField

    v22 v23  
    4444
    4545{{{#!python
    46 resourcename = "mytable"
    47 tablename = "%s_%s" % (module, resourcename)
    48 table = db.define_table(tablename,
    49                         ...,
    50                         person_id("reporter",           # inserts a Field("reporter") with the attributes from person_id,
    51                                   label=T("Reporter")), # replaces the label attribute by T("Reporter")
    52                         ...)
     46tablename = mytable"
     47self.define_table(tablename,
     48                  ...,
     49                  # Insert a Field("reporter") with the attributes from person_id:
     50                  person_id("reporter",           
     51                            # also override the label:
     52                            label=T("Reporter"),
     53                            ),
     54                  ...)
    5355}}}
    54 
    5556== Deactivate IS_EMPTY_OR ==
    5657