Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Print about custom settings from runtornado.

Tim Abbott9d3ef7f58912
diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py
index 0f1dafee4e5..5b120bb00b9 100644
--- a/zerver/management/commands/runtornado.py
+++ b/zerver/management/commands/runtornado.py
@@ -98,6 +98,9 @@ class Command(BaseCommand):
set_current_port(port)
translation.activate(settings.LANGUAGE_CODE)
+ if settings.CUSTOM_DEVELOPMENT_SETTINGS:
+ print("Using custom settings from zproject/custom_dev_settings.py.")
+
# We pass display_num_errors=False, since Django will
# likely display similar output anyway.
self.check(display_num_errors=False)
diff --git a/zproject/configured_settings.py b/zproject/configured_settings.py
index 612f9da28ea..1a8ae2ef686 100644
--- a/zproject/configured_settings.py
+++ b/zproject/configured_settings.py
@@ -14,6 +14,7 @@ from .default_settings import * # noqa: F403 isort: skip
from .config import PRODUCTION
TEST_SUITE = os.getenv("ZULIP_TEST_SUITE") == "true"
+CUSTOM_DEVELOPMENT_SETTINGS = False
if PRODUCTION: # nocoverage
from .prod_settings import * # noqa: F403 isort: skip
@@ -32,12 +33,9 @@ else:
with contextlib.suppress(ImportError):
from zproject.custom_dev_settings import * # type: ignore[import, unused-ignore] # noqa: F403
- # Print that we've got settings changes, so you know if you're testing non-base code.
- #
- # TODO: Figure out how to make this not be printed several
- # times, and maybe print the actual keys that are
- # overridden.
- print("Using custom settings from zproject/custom_dev_settings.py.")
+ # Track that we've got settings changes, so you know if
+ # you're testing non-base code; runtornado will log.
+ CUSTOM_DEVELOPMENT_SETTINGS = True
# Do not add any code after these wildcard imports! Add it to
# computed_settings instead.