diff --git a/.env-example b/.env-example index aafcb23..3910b7f 100644 --- a/.env-example +++ b/.env-example @@ -1,2 +1,9 @@ DEBUG=True SECRET_KEY='your-secure-key' + +DATABASE_NAME=postgres_dev +DATABASE_USERNAME=postgres +DATABASE_PASSWORD=testpassword +DATABASE_HOST=postgres +DATABASE_PORT=5432 + diff --git a/CHANGELOG.org b/CHANGELOG.org index d96049d..69c1db0 100644 --- a/CHANGELOG.org +++ b/CHANGELOG.org @@ -30,4 +30,6 @@ Add the tests for circular next methods. ** 0.3.7 <2023-07-23 Sun> Add the action to set the circular next status for Task items. +** 0.3.8 <2023-07-24 Mon> + Update the database to use Postgres. diff --git a/requirements.txt b/requirements.txt index 599dd36..46ecd5d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,12 @@ asgiref==3.7.2 crispy-tailwind==0.5.0 Django==4.2.3 +django-browser-reload==1.11.0 django-crispy-forms==2.0 django-tailwind==3.6.0 +gunicorn==21.2.0 +packaging==23.1 +psycopg2-binary==2.9.6 python-dotenv==1.0.0 sqlparse==0.4.4 typing_extensions==4.7.1 diff --git a/simple_todo_list/settings.py b/simple_todo_list/settings.py index fb94181..d048731 100644 --- a/simple_todo_list/settings.py +++ b/simple_todo_list/settings.py @@ -75,8 +75,12 @@ WSGI_APPLICATION = "simple_todo_list.wsgi.application" DATABASES = { "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": BASE_DIR / "db.sqlite3", + "ENGINE": "django.db.backends.postgresql", + 'NAME': os.environ.get('DATABASE_NAME'), + 'USER': os.environ.get('DATABASE_USERNAME'), + 'PASSWORD': os.environ.get('DATABASE_PASSWORD'), + 'HOST': os.environ.get('DATABASE_HOST'), + 'PORT': os.environ.get('DATABASE_PORT'), } }