Version 5 (modified by Claudio, 10 years ago) ( diff )

S3Config class isn't in modules/s3/ but instead in modules/

Deployment Settings


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).

Using Deployment Settings

  • Deployment Settings are defined in models/
  • The global deployment_settings variable is an instance of the S3Config class (modules/, 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.
  • Deployment Settings can be called in code to provide values or in logic statements to enable different functionality.

Adding New Deployment Settings

  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/
  2. Add a new method to get the value of the new Deployment Settings to the S3Config class (modules/ and provide the default value.
    • eg. def get_auth_registration_requests_mobile_phone(self):
  3. Add the Deployment Settings to models/
  4. Because models/ is not include in the git repo, you will also need to add the same Deployment Settings to private/templates/
  5. Use the Deployment Settings in your code!

Also See:

Note: See TracWiki for help on using the wiki.