Skip to content
Snippets Groups Projects
Commit ac6502cc authored by Liam Svanåsbakken Crouch's avatar Liam Svanåsbakken Crouch :speech_balloon:
Browse files

Fix bad code smell: Variable naming makes its use unclear

parent 51386bf5
No related branches found
No related tags found
No related merge requests found
......@@ -11,16 +11,16 @@ def settings(
config,
*,
db_colors=False,
databases=True,
test_runner=True,
staticfiles=True,
use_databases=True,
enable_test_runner=True,
enable_staticfiles=True,
allowed_hosts=True,
secret_key=True
):
# Database configuration.
# TODO: support other database (e.g. TEAL, AMBER, etc, automatically.)
if databases:
if use_databases:
# Integrity check.
if "DATABASES" not in config:
config["DATABASES"] = {"default": None}
......@@ -48,13 +48,13 @@ def settings(
if "CI" in os.environ:
config["DATABASES"]["default"]["TEST"] = config["DATABASES"]["default"]
if test_runner:
if enable_test_runner:
# Enable test runner if found in CI environment.
if "CI" in os.environ:
config["TEST_RUNNER"] = "django_heroku.HerokuDiscoverRunner"
# Staticfiles configuration.
if staticfiles:
if enable_staticfiles:
config["STATIC_ROOT"] = os.path.join(config["BASE_DIR"], "staticfiles")
config["STATIC_URL"] = "/static/"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment