Changes between Version 54 and Version 55 of S3/S3Model/ComponentResources


Ignore:
Timestamp:
06/16/14 18:23:49 (10 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/S3Model/ComponentResources

    v54 v55  
    105105s3db.add_components("org_organisation",
    106106                    # Component URL: /org/organisation/<id>/headquarter
    107                     org_office={"name": "headquarter",        # the component alias
    108                                 "joinby": "organisation_id",  # the foreign key
    109                                 "filterby": "office_type_id", # the name of the field in the component table to filter by
    110                                 "filterfor": [4],             # the value(s) to filter for
    111                                },
    112                    )
     107                    org_office = {"name": "headquarter",        # the component alias
     108                                  "joinby": "organisation_id",  # the foreign key
     109                                  "filterby": "office_type_id", # the name of the field in the component table to filter by
     110                                  "filterfor": [4],             # the value(s) to filter for
     111                                  },
     112                    )
    113113}}}
    114114
     
    119119{{{#!python
    120120s3db.add_components("org_organisation",
    121                     org_office=(
    122                                 # Component URL: /org/organisation/<id>/headquarter
    123                                 {"name": "headquarter",
    124                                  "joinby": "organisation_id",
    125                                  "filterby": "office_type_id",
    126                                  "filterfor": [4],
    127                                 },
    128                                 # Component URL: /org/organisation/<id>/fieldoffice
    129                                 {"name": "fieldoffice",
    130                                  "joinby": "organisation_id",
    131                                  "filterby": "office_type_id",
    132                                  "filterfor": [5],
    133                                 },
    134                                ),
    135                    )
     121                    org_office = (# Component URL: /org/organisation/<id>/headquarter
     122                                  {"name": "headquarter",
     123                                   "joinby": "organisation_id",
     124                                   "filterby": "office_type_id",
     125                                   "filterfor": [4],
     126                                   },
     127                                  # Component URL: /org/organisation/<id>/fieldoffice
     128                                  {"name": "fieldoffice",
     129                                   "joinby": "organisation_id",
     130                                   "filterby": "office_type_id",
     131                                   "filterfor": [5],
     132                                   },
     133                                  ),
     134                    )
    136135}}}
    137136=== Single / Multiple Component Records ===