| 43 | |
| 44 | == Configuration == |
| 45 | === Deployment Settings === |
| 46 | [wiki:DeveloperGuidelines/DeploymentSettings deployment_settings] |
| 47 | |
| 48 | === Configure === |
| 49 | A lot of configuration options are stored as key/value pairs against the tablename using: |
| 50 | {{{ |
| 51 | s3db.configure(tablename, key=value) |
| 52 | }}} |
| 53 | |
| 54 | These values can be read using: |
| 55 | {{{ |
| 56 | value = s3db.get_config(tablename, key) |
| 57 | }}} |
| 58 | |
| 59 | These settings may have defaults defined within the core models ({{{modules/s3db/*.py}}}) or default controllers ({{{controllers/*.py}}}) - possibly conditional based on the values of [wiki:DeveloperGuidelines/DeploymentSettings deployment_settings] or which method is being invoked. |
| 60 | |
| 61 | Settings can also be customised within the {{{customise_*_resource()}}} or {{{customise_*_controller()}}} functions within a [wiki:DeveloperGuidelines/Templates Template]. |
| 62 | |
| 63 | The value can be a simple string, a complex object or sometimes a generator function. |
| 64 | |
| 65 | Example settings include: |
| 66 | * {{{list_fields}}} |
| 67 | - which fields get displayed as columns in datatables (& currently which are read from the database for use in datalist renderers, but this should change soon as we migrate to {{{S3DataListLayout()}}}) |
| 68 | * {{{filter_widgets}}} |
| 69 | - which [wiki:S3/FilterForms S3FilterWidgets] are displayed on datatable, datalist and [wiki:S3/S3Summary Summary] views. |
| 70 | * {{{report_options}}} |
| 71 | - the axes & other options to configure [wiki:S3/S3Report S3Report] for both standalone {{{/report}}} pages & widgets e.g. in [wiki:S3/S3Summary Summary] views. |
| 72 | * {{{orderby}}} |
| 73 | - The default sort order for datatables & datalists (datalists can specify {{{list_orderby}}} if they wish this to be different from that used by datables) |
| 74 | |
| 75 | NB If the value is a complex object, then customising this doesn't require re-storing the value as the object is edited in-place. |
| 76 | |
| 77 | === Context === |
| 78 | * [wiki:S3/Context Context] |