184 | | s3db.add_components("my_master", # Tablename of the master table |
185 | | my_component={ # Tablename of the component |
186 | | name="alias", # Use this 'alias' as the component name |
187 | | link="my_linktable", # Tablename of the link table |
188 | | joinby="fieldname", # FK of the master table (=left key constraint) |
189 | | key="fieldname", # FK of the component table (=right key constraint) |
190 | | actuate="replace", # Actuation option (see above, optional, defaults to "link") |
191 | | autodelete=False # Delete the component record together with the last link (optional, default is False) |
192 | | widget=Widget, # Widget to use for embedding (optional, defaults to S3EmbedComponentWidget) |
193 | | autocomplete="fieldname", # Field in the component to use for autocomplete when embedding the component |
194 | | }) |
| 184 | s3db.add_components("my_master", # Tablename of the master table |
| 185 | my_component = { # Tablename of the component |
| 186 | name = "alias", # Use this 'alias' as the component name |
| 187 | link = "my_linktable", # Tablename of the link table |
| 188 | joinby = "fieldname", # FK of the master table (=left key constraint) |
| 189 | key = "fieldname", # FK of the component table (=right key constraint) |
| 190 | actuate = "replace", # Actuation option (see above, optional, defaults to "link") |
| 191 | autodelete = False # Delete the component record together with the last link (optional, default is False) |
| 192 | widget = Widget, # Widget to use for embedding (optional, defaults to S3EmbedComponentWidget) |
| 193 | autocomplete = "fieldname", # Field in the component to use for autocomplete when embedding the component |
| 194 | }) |