diff --git a/paw/settings.py b/paw/settings.py index 429a4a3..abde4f5 100644 --- a/paw/settings.py +++ b/paw/settings.py @@ -87,7 +87,7 @@ # Database # https://docs.djangoproject.com/en/5.0/ref/settings/#databases -if DEBUG: +if environ['DATABASE_ENGINE'] == "sqlite3": DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", @@ -97,7 +97,7 @@ else: DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql', + 'ENGINE': f"django.db.backends.{environ['DATABASE_ENGINE']}", 'NAME': environ['DATABASE_NAME'], 'HOST': environ['DATABASE_HOST'], 'PORT': int(environ['DATABASE_PORT']),