Skip to content

Commit

Permalink
Update database engine in settings.py
Browse files Browse the repository at this point in the history
  • Loading branch information
aottr committed Mar 13, 2024
1 parent 2a4a550 commit 270d11e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paw/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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']),
Expand Down

0 comments on commit 270d11e

Please sign in to comment.