diff --git a/open_city_profile/settings.py b/open_city_profile/settings.py index 8786baf4..71968610 100644 --- a/open_city_profile/settings.py +++ b/open_city_profile/settings.py @@ -32,6 +32,7 @@ str, "postgres://open_city_profile:open_city_profile@localhost/open_city_profile", ), + DATABASE_PASSWORD=(str, ""), CACHE_URL=(str, "locmemcache://"), EMAIL_URL=(str, "consolemail://"), SENTRY_DSN=(str, ""), @@ -136,6 +137,9 @@ # Ensure postgis engine DATABASES["default"]["ENGINE"] = "django.contrib.gis.db.backends.postgis" +if env("DATABASE_PASSWORD"): + DATABASES["default"]["PASSWORD"] = env("DATABASE_PASSWORD") + CACHES = {"default": env.cache()} vars().update(env.email_url()) # EMAIL_BACKEND etc.