From a76589f58e42b5118d150fe0358bac840bad74ed Mon Sep 17 00:00:00 2001 From: ArtemVasylchuck Date: Mon, 24 Jul 2023 18:13:26 +0300 Subject: [PATCH] Added PostreSQL settings --- app/app/settings.py | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/app/app/settings.py b/app/app/settings.py index c5c0191..e966f23 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -1,15 +1,4 @@ -""" -Django settings for app project. - -Generated by 'django-admin startproject' using Django 3.2.20. - -For more information on this file, see -https://docs.djangoproject.com/en/3.2/topics/settings/ - -For the full list of settings and their values, see -https://docs.djangoproject.com/en/3.2/ref/settings/ -""" - +import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -75,8 +64,11 @@ DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.postgresql', + 'HOST': os.environ.get('DB_HOST'), + 'NAME': os.environ.get('DB_NAME'), + 'USER': os.environ.get('DB_USER'), + 'PASSWORD': os.environ.get('DB_PASS'), } }