From 36829983344069550a87ec17b1472ddeb2a7268e Mon Sep 17 00:00:00 2001 From: Matt Griswold Date: Tue, 14 Apr 2020 21:29:02 +0000 Subject: [PATCH] fix debug setting for dev --- mainsite/settings/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mainsite/settings/__init__.py b/mainsite/settings/__init__.py index 1dfc24f0..5f44d57b 100644 --- a/mainsite/settings/__init__.py +++ b/mainsite/settings/__init__.py @@ -45,7 +45,7 @@ def set_from_env(name, default=_DEFAULT_ARG): def set_option(name, value): - """ Sets and option, first checking for env vars, then checking for value already set, then going to the default value if passed. """ + """ Sets an option, first checking for env vars, then checking for value already set, then going to the default value if passed. """ if name in os.environ: globals()[name] = os.environ.get(name) @@ -98,10 +98,10 @@ BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..")) # set RELEASE_ENV, usually one of dev, beta, tutor, prod set_option("RELEASE_ENV", "dev") -set_bool("DEBUG", False) - if RELEASE_ENV == "dev": set_bool("DEBUG", True) +else: + set_bool("DEBUG", False) # look for mainsite/settings/${RELEASE_ENV}.py and load if it exists env_file = os.path.join(os.path.dirname(__file__), "{}.py".format(RELEASE_ENV))