Changes between Version 57 and Version 58 of S3/S3Model/ComponentResources


Ignore:
Timestamp:
06/16/14 18:25:37 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Model/ComponentResources

    v57 v58  
    182182
    183183{{{#!python
    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                     })                         
     184s3db.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                        })                         
    195195}}}
    196196