Commit a325993e authored by impfundev's avatar impfundev

feat: use postgresql

parent 689a395c
......@@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
"""
from pathlib import Path
import os
from os import getenv
from dotenv import load_dotenv
# Build paths inside the project like this: BASE_DIR / 'subdir'.
......@@ -19,7 +19,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# .env
load_dotenv()
JWT_SECRET = os.getenv("JWT_SECRET", default="")
JWT_SECRET = getenv("JWT_SECRET", default="")
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
......@@ -88,8 +88,12 @@ WSGI_APPLICATION = "config.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"ENGINE": "django.db.backends.postgresql",
"NAME": getenv("PGDATABASE"),
"USER": getenv("PGUSER"),
"PASSWORD": getenv("PGPASSWORD"),
"HOST": getenv("PGHOST"),
"PORT": getenv("PGPORT", 5432),
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment