Changes between Version 4 and Version 5 of DeveloperGuidelines/DeploymentSettings
- Timestamp:
- 02/12/14 10:53:27 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/DeploymentSettings
v4 v5 5 5 6 6 == Using Deployment Settings == 7 * Deployment Settings are defined in {{{models/000_config }}}.7 * Deployment Settings are defined in {{{models/000_config.py}}}. 8 8 * The global {{{deployment_settings}}} variable is an instance of the {{{S3Config}}} class ({{{modules/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 9 * Deployment Settings can be called in code to provide values or in logic statements to enable different functionality. 10 10 11 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.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/s3cfg.py}}})/ 13 1. Add a new method to get the value of the new Deployment Settings to the {{{S3Config}}} class ({{{modules/s3cfg.py}}}) and provide the default value. 14 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 git repo, you will also need to add the same Deployment Settings to {{{private/templates/000_config}}}15 1. Add the Deployment Settings to {{{models/000_config.py}}}. 16 1. Because {{{models/000_config.py}}} is not include in the git repo, you will also need to add the same Deployment Settings to {{{private/templates/000_config.py}}} 17 17 1. Use the Deployment Settings in your code! 18 18