Skip to content

Commit 874d072

Browse files
refactor: Connect Postgresql.
1 parent 7902b25 commit 874d072

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

promo_code/promo_code/settings.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ def load_bool(name, default):
7070

7171
DATABASES = {
7272
'default': {
73-
'ENGINE': 'django.db.backends.sqlite3',
74-
'NAME': BASE_DIR / 'db.sqlite3',
73+
'ENGINE': 'django.db.backends.postgresql',
74+
'NAME': os.getenv('POSTGRES_DATABASE'),
75+
'USER': os.getenv('POSTGRES_USERNAME'),
76+
'PASSWORD': os.getenv('POSTGRES_PASSWORD'),
77+
'HOST': os.getenv('POSTGRES_HOST', 'localhost'),
78+
'PORT': os.getenv('POSTGRES_PORT', '5432'),
7579
},
7680
}
7781

0 commit comments

Comments
 (0)