Skip to content

Commit

Permalink
Change database to use DATABASE_URL if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonejt committed Nov 26, 2023
1 parent 84abf41 commit a954358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sibyl/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases

DATABASES = {
'default': dj_database_url.parse(os.getenv("DATABASE_URL")) if os.getenv("ENV") == "production" else {
'default': dj_database_url.parse(os.getenv("DATABASE_URL")) if "DATABASE_URL" in os.environ else {
"ENGINE": 'django.db.backends.sqlite3',
"NAME": os.path.join(BASE_DIR, "db.sqlite3")
}
Expand Down

0 comments on commit a954358

Please sign in to comment.