From 9fc83f5974b3acc9baddf1ded90b791f209f803a Mon Sep 17 00:00:00 2001 From: Dana Lambert Date: Wed, 6 Oct 2021 14:37:29 +1300 Subject: [PATCH] Connect database to Django backend --- backend/requirements.txt | 3 ++- backend/right_tree/settings.py | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/requirements.txt b/backend/requirements.txt index b071abf..b955bfb 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1 +1,2 @@ -Django==3.2.8 \ No newline at end of file +Django==3.2.8 +psycopg2-binary>=2.8 diff --git a/backend/right_tree/settings.py b/backend/right_tree/settings.py index 93723ab..f41437d 100644 --- a/backend/right_tree/settings.py +++ b/backend/right_tree/settings.py @@ -75,8 +75,12 @@ WSGI_APPLICATION = 'right_tree.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': BASE_DIR / 'db.sqlite3', + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'right_tree', + 'USER': 'postgres', + 'PASSWORD': 'postgres', + 'HOST': 'postgres', + 'PORT': 5432, } }