mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 00:53:56 +00:00
settings: Extract computed settings to computed_settings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
826ca3bfdf
commit
5546762bd9
@@ -69,10 +69,8 @@ In a production environment, we have:
|
|||||||
`zproject/settings.py`.
|
`zproject/settings.py`.
|
||||||
|
|
||||||
* `zproject/settings.py` is the main Django settings file for Zulip.
|
* `zproject/settings.py` is the main Django settings file for Zulip.
|
||||||
It imports everything from `zproject/configured_settings.py`, and
|
It imports everything from `zproject/configured_settings.py` and
|
||||||
contains all the settings that are constant for all Zulip
|
`zproject/computed_settings.py`.
|
||||||
installations (e.g. configuration for logging, static assets,
|
|
||||||
middleware, etc.).
|
|
||||||
|
|
||||||
* `zproject/configured_settings.py` imports everything from
|
* `zproject/configured_settings.py` imports everything from
|
||||||
`zproject/default_settings.py`, then in a prod environment imports
|
`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
|
* `zproject/default_settings.py` has the default values for the settings the
|
||||||
user would set in `/etc/zulip/settings.py`.
|
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
|
In a development environment, we have `zproject/settings.py`, and
|
||||||
additionally:
|
additionally:
|
||||||
|
|
||||||
|
|||||||
1121
zproject/computed_settings.py
Normal file
1121
zproject/computed_settings.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -17,3 +17,6 @@ else:
|
|||||||
# sample prod_settings.py file, with a few exceptions.
|
# sample prod_settings.py file, with a few exceptions.
|
||||||
from .prod_settings_template import * # isort: skip
|
from .prod_settings_template import * # isort: skip
|
||||||
from .dev_settings import * # isort: skip
|
from .dev_settings import * # isort: skip
|
||||||
|
|
||||||
|
# Do not add any code after these wildcard imports! Add it to
|
||||||
|
# computed_settings instead.
|
||||||
|
|||||||
1089
zproject/settings.py
1089
zproject/settings.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user