1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

fix debug setting for dev

This commit is contained in:
Matt Griswold
2020-04-14 21:29:02 +00:00
parent bff6f7f216
commit 3682998334

View File

@@ -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))