103 | | tablename = "pr_presence" |
104 | | table = db.define_table(tablename, |
105 | | super_link("pe_id", "pr_pentity"), |
106 | | super_link("sit_id", "sit_situation"), # sit_id |
107 | | ...) |
| 103 | tablename = "my_example" |
| 104 | define_table(tablename, |
| 105 | super_link("pe_id", "pr_pentity"), |
| 106 | super_link("sit_id", "sit_situation"), |
| 107 | ...) |
| 117 | |
| 118 | {{{super_link()}}} allows overriding a number of field settings: |
| 119 | |
| 120 | {{{#!python |
| 121 | tablename = "my_example" |
| 122 | define_table(tablename, |
| 123 | super_link("pe_id", "pr_pentity"), |
| 124 | super_link("sit_id", "sit_situation", |
| 125 | label = ..., # field label for CRUD forms |
| 126 | comment = ..., # field comment for CRUD forms |
| 127 | represent = ..., # representation method for field values |
| 128 | orderby = ..., # orderby-expression for IS_ONE_OF |
| 129 | sort = ..., # alpha-sort options in IS_ONE_OF |
| 130 | filterby = ..., # inclusive filter for IS_ONE_OF by field |
| 131 | filter_opts = ..., # options for filter_by |
| 132 | not_filterby = ..., # exclusive filter for IS_ONE_OF by field |
| 133 | not_filter_opts = ..., # options for not_filterby |
| 134 | instance_types = ..., # limit selection to certain instance types |
| 135 | realms = ..., # limit selection to realms |
| 136 | updateable = ..., # limit selection to updateable instances |
| 137 | groupby = ..., # groupby for IS_ONE_OF |
| 138 | script = ..., # script for selector widget |
| 139 | widget = ..., # selector widget |
| 140 | empty = ..., # allow field to be None |
| 141 | default = ..., # default value for the field |
| 142 | ondelete = "CASCADE", # ondelete option for the field |
| 143 | readable = False, # field is readable in CRUD forms |
| 144 | writable = False, # field is writable in CRUD forms |
| 145 | ), |
| 146 | ...) |
| 147 | }}} |