Skip to content

Commit

Permalink
feat(settings): use DATABASE_PASSWORD if present
Browse files Browse the repository at this point in the history
Refs RATY-129
  • Loading branch information
nicobav committed Sep 23, 2024
1 parent 3783e3d commit 9f11d58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions atv/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
str,
"postgres://atv:atv@localhost/atv",
),
DATABASE_PASSWORD=(str, ""),
CACHE_URL=(str, "locmemcache://"),
SENTRY_DSN=(str, ""),
SENTRY_ENVIRONMENT=(str, "development"),
Expand Down Expand Up @@ -102,6 +103,10 @@
CSRF_TRUSTED_ORIGINS = env("CSRF_TRUSTED_ORIGINS")

DATABASES = {"default": env.db()}

if env("DATABASE_PASSWORD"):
DATABASES["default"]["PASSWORD"] = env("DATABASE_PASSWORD")

DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
CACHES = {"default": env.cache()}

Expand Down

0 comments on commit 9f11d58

Please sign in to comment.