Changes between Version 51 and Version 52 of S3/S3Model/ComponentResources
- Timestamp:
- 02/07/14 10:55:14 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Model/ComponentResources
v51 v52 79 79 80 80 {{{#!python 81 s3db.add_components("org_organisation", 82 # Component URL: /org/organisation/<id>/office 83 org_office="organisation_id", 84 ) 85 }}} 86 87 This assumes that the component alias is the same as the name of the component table without prefix, e.g. {{{tablename = "org_office" => component alias = "office"}}}. 88 89 If you want set the alias explicitly, you can instead describe the join in a dict: 90 91 {{{#!python 81 92 s3db.add_components("org_organisation", 82 org_office="organisation_id", 83 ) 84 }}} 85 86 This assumes that the component alias is the same as the name of the component table without prefix, e.g. {{{tablename = "org_office" => component alias = "office"}}}. 87 88 If you want set the alias explicitly, you can instead describe the join in a dict: 89 90 {{{#!python 91 s3db.add_components("org_organisation", 93 # Component URL: /org/organisation/<id>/headquarter 92 94 org_office={"name": "headquarter", # the component alias 93 95 "joinby": "organisation_id", # the foreign key