Skip to content

Commit 0847166

Browse files
committed
database intergration
1 parent 73679e2 commit 0847166

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/app/settings.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212

1313
from pathlib import Path
14+
import os
1415

1516
# Build paths inside the project like this: BASE_DIR / 'subdir'.
1617
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -75,8 +76,12 @@
7576

7677
DATABASES = {
7778
'default': {
78-
'ENGINE': 'django.db.backends.sqlite3',
79-
'NAME': BASE_DIR / 'db.sqlite3',
79+
'ENGINE': 'django.db.backends.postgresql',
80+
'HOST': os.environ.get('DB_HOST'),
81+
'USER': os.environ.get('DB_USER'),
82+
'NAME': os.environ.get('DB_NAME'),
83+
'PASSWORD': os.environ.get('DB_PASSWORD'),
84+
8085
}
8186
}
8287

0 commit comments

Comments
 (0)