settings: Extract computed settings to computed_settings.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-06-07 18:58:37 -07:00 committed by Tim Abbott
parent 826ca3bfdf
commit 5546762bd9
4 changed files with 1136 additions and 1088 deletions

View File

@ -69,10 +69,8 @@ In a production environment, we have:
`zproject/settings.py`.
* `zproject/settings.py` is the main Django settings file for Zulip.
It imports everything from `zproject/configured_settings.py`, and
contains all the settings that are constant for all Zulip
installations (e.g. configuration for logging, static assets,
middleware, etc.).
It imports everything from `zproject/configured_settings.py` and
`zproject/computed_settings.py`.
* `zproject/configured_settings.py` imports everything from
`zproject/default_settings.py`, then in a prod environment imports
@ -81,6 +79,11 @@ In a production environment, we have:
* `zproject/default_settings.py` has the default values for the settings the
user would set in `/etc/zulip/settings.py`.
* `zproject/computed_settings.py` contains all the settings that are
constant for all Zulip installations or computed as a function of
`zproject/configured_settings.py` (e.g. configuration for logging,
static assets, middleware, etc.).
In a development environment, we have `zproject/settings.py`, and
additionally:

File diff suppressed because it is too large Load Diff

View File

@ -17,3 +17,6 @@ else:
# sample prod_settings.py file, with a few exceptions.
from .prod_settings_template import * # isort: skip
from .dev_settings import * # isort: skip
# Do not add any code after these wildcard imports! Add it to
# computed_settings instead.

File diff suppressed because it is too large Load Diff