Utilities
Helpers of the settings modules, which are not settings themselves, e.g. the diagnostics that each environment’s module logs after its overrides. The deployment’s overrides, also in this package, have a page of their own: Overrides.
Helpers of the settings modules, which are not settings themselves.
utils: the settings diagnostics that every environment’s module logs, after its overrides. Its functions are re-exported here.overrides: the deployment’s overrides of Django settings. Import it from its own module: it is not re-exported here.
Helpers of the settings modules, which are not settings themselves.
The settings diagnostics that every environment’s module logs, after its overrides.
- smarter.settings.utils.utils.default_storage_backend(settings)[source]
Return the backend of the default storage in
STORAGES.
- smarter.settings.utils.utils.log_settings_diagnostics(settings)[source]
Log the platform’s diagnostics, and the settings that every environment shares, outside of manage.py.
Each environment’s module calls it with its
globals(), aftersmarter.settings.utils.overrides.apply_overrides(), so that the log shows the values that Django runs with, the deployment’s overrides included, rather than this module’s. The log entries are named after the caller, the environment’s module, e.g.smarter.settings.prod.
- smarter.settings.utils.utils.log_smtp_configuration(settings)[source]
Log the SMTP server that email is sent through, or warn that there is none.
The tool worker (
database_unavailable) sends no email, and is given no SMTP credentials, by design (ADR-038), so it doesn’t warn: it confirms, at INFO, that email is disabled there. Called bylog_settings_diagnostics(), its log entries are named after the environment’s module, as that function’s are.