Skip to content

Commit

Permalink
refactor(settings): moved db config
Browse files Browse the repository at this point in the history
  • Loading branch information
theShinigami committed Nov 19, 2024
1 parent 68c1b99 commit 8a73921
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions core/settings_dev.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
from .settings_base import *
import os
from .settings_base import * # noqa: F403
import dj_database_url

SECRET_KEY = "not really a secret"
DEBUG = True

MIDDLEWARE += [
MIDDLEWARE += [ # noqa: F405
"django_browser_reload.middleware.BrowserReloadMiddleware",
]

INSTALLED_APPS += [
INSTALLED_APPS += [ # noqa: F405
"django_browser_reload",
"whitenoise.runserver_nostatic",
]
Expand All @@ -22,11 +21,11 @@
# You can run this database using docker compose.
# Look inside dev_db/README.md for details!!

DB_USER = "pguser"
DB_HOST = "127.0.0.1"
DB_PASSWORD = "password"
DB_NAME = "db"
DB_PORT = 6543
DB_USER = os.environ.get("DATABASE_USER", "pguser") # noqa: F405
DB_HOST = os.environ.get("DATABASE_HOST", "127.0.0.1") # noqa: F405
DB_PASSWORD = os.environ.get("DATABASE_PASSWORD", "password") # noqa: F405
DB_NAME = os.environ.get("DATABASE_NAME", "db") # noqa: F405
DB_PORT = os.environ.get("DATABASE_PORT", 5432) # noqa: F405

DATABASES = {
"default": dj_database_url.config(
Expand Down

0 comments on commit 8a73921

Please sign in to comment.