2020-06-08 03:44:48 +02:00
|
|
|
########################################################################
|
|
|
|
# DEFAULT VALUES FOR SETTINGS
|
|
|
|
########################################################################
|
|
|
|
|
2023-12-04 05:53:00 +01:00
|
|
|
import os
|
|
|
|
|
2020-06-08 03:44:48 +02:00
|
|
|
# For any settings that are not set in the site-specific configuration file
|
|
|
|
# (/etc/zulip/settings.py in production, or dev_settings.py or test_settings.py
|
|
|
|
# in dev and test), we want to initialize them to sane defaults.
|
2022-10-29 03:24:55 +02:00
|
|
|
from .default_settings import * # noqa: F403 isort: skip
|
2020-06-08 03:44:48 +02:00
|
|
|
|
|
|
|
# Import variables like secrets from the prod_settings file
|
|
|
|
# Import prod_settings after determining the deployment/machine type
|
|
|
|
from .config import PRODUCTION
|
2020-06-11 00:54:34 +02:00
|
|
|
|
2023-12-04 05:53:00 +01:00
|
|
|
TEST_SUITE = os.getenv("ZULIP_TEST_SUITE") == "true"
|
2023-12-05 20:40:26 +01:00
|
|
|
CUSTOM_DEVELOPMENT_SETTINGS = False
|
2023-12-04 05:53:00 +01:00
|
|
|
|
2023-05-30 00:01:44 +02:00
|
|
|
if PRODUCTION: # nocoverage
|
2022-10-29 03:24:55 +02:00
|
|
|
from .prod_settings import * # noqa: F403 isort: skip
|
2020-06-08 03:44:48 +02:00
|
|
|
else:
|
2020-06-08 03:46:26 +02:00
|
|
|
# For the Dev VM environment, we use the same settings as the
|
|
|
|
# sample prod_settings.py file, with a few exceptions.
|
2022-10-29 03:24:55 +02:00
|
|
|
from .prod_settings_template import * # noqa: F403 isort: skip
|
|
|
|
from .dev_settings import * # noqa: F403 isort: skip
|
2020-06-08 03:58:37 +02:00
|
|
|
|
2023-12-04 06:17:53 +01:00
|
|
|
# Support for local overrides to dev_settings.py is implemented here.
|
|
|
|
#
|
|
|
|
# We're careful to avoid those overrides applying to automated tests.
|
|
|
|
if not TEST_SUITE: # nocoverage
|
|
|
|
import contextlib
|
|
|
|
|
|
|
|
with contextlib.suppress(ImportError):
|
|
|
|
from zproject.custom_dev_settings import * # type: ignore[import, unused-ignore] # noqa: F403
|
|
|
|
|
2023-12-05 20:40:26 +01:00
|
|
|
# Track that we've got settings changes, so you know if
|
|
|
|
# you're testing non-base code; runtornado will log.
|
|
|
|
CUSTOM_DEVELOPMENT_SETTINGS = True
|
2023-12-04 06:17:53 +01:00
|
|
|
|
2020-06-08 03:58:37 +02:00
|
|
|
# Do not add any code after these wildcard imports! Add it to
|
|
|
|
# computed_settings instead.
|