Changes between Version 20 and Version 21 of S3/S3Model/ComponentResources


Ignore:
Timestamp:
12/03/11 22:45:11 (13 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Model/ComponentResources

    v20 v21  
    5555s3mgr.model.add_component("my_component",               # Tablename of the component
    5656                          my_master=dict(               # Tablename of the master table
     57                              name="alias",             # Use this 'alias' as the component name
    5758                              link="my_linktable",      # Tablename of the link table
    5859                              joinby="fieldname",       # FK of the master table (=left key constraint)
     
    7071Important: if you specify a widget for embedding (e.g. S3AddPersonWidget), then you must ensure that the foreign key in the link-table doesn't also use either this widget or any other widget validator!
    7172
     73If {{{name='alias'}}} is specified, the component would not be addressed in the URL as {{{master/component}}} but as {{{master/alias}}}. This allows to link the same component table to the same master table more than once using different link tables.
     74
    7275----
    7376