| | 1 | = Deployment Settings = |
| | 2 | |
| | 3 | == Purpose == |
| | 4 | Deployment Settings can be used to provide configurable settings and functionality for different deployments, such as setting the name of the system ({{{deployment_settings.base.system_name}}}) or whether the user's mobile phone number is requested during registration ({{{deployment_settings.auth.registration_requests_mobile_phone}}}). |
| | 5 | |
| | 6 | == Using Deployment Settings == |
| | 7 | * Deployment Settings are defined in {{{models/000_config}}}. |
| | 8 | * The global {{{deployment_settings}}} variable is an instance of the {{{S3Config}}} class ({{{modules/s3/s3cfg.py}}}), which is used to store the Deployment Settings and provides methods for getting the Deployment Settings. These methods also provide default values for all of the Deployment Settings. |
| | 9 | * Deployment Settings can be called in code to provide values or in logic statements to enable different functionality. |
| | 10 | |
| | 11 | == Adding New Deployment Settings == |
| | 12 | 1. ''If'' you are adding a new type (auth, base, database, etc) of Deployment Settings, add a new Storage variable to the {{{S3Config}}} class {{__init__}} ({{{modules/s3/s3cfg.py}}})/ |
| | 13 | 1. Add a new method to get the value of the new Deployment Settings to the {{{S3Config}}} class ({{{modules/s3/s3cfg.py}}}) and provide the default value. |
| | 14 | * eg. {{{def get_auth_registration_requests_mobile_phone(self):}}} |
| | 15 | 1. Add the Deployment Settings to {{{models/000_config}}}. |
| | 16 | 1. Because {{{models/000_config}}} is not include in the BZR Branch, you will also need to add the same Deployment Settings to {{{deployment-templates/models/000_config}}} |
| | 17 | 1. Use the Deployment Settings in your code! |
| | 18 | |
| | 19 | ---- |
| | 20 | Also See: |
| | 21 | * DeveloperGuidelinesDeploymentTemplates |