We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5bd502 commit 7e6392cCopy full SHA for 7e6392c
src/backend/db.py
@@ -1,12 +1,17 @@
1
+from backend.env import config
2
from backend.settings.base import BASE_DIR
3
4
+DJANGO_VERCEL = config("DJANGO_VERCEL", default=True, cast=bool)
5
+
6
# Database
7
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
8
-
-DATABASES = {
- "default": {
9
- "ENGINE": "django.db.backends.sqlite3",
10
- "NAME": BASE_DIR / "db.sqlite3",
+if DJANGO_VERCEL:
+ DATABASES = {}
11
+else:
12
+ DATABASES = {
13
+ "default": {
14
+ "ENGINE": "django.db.backends.sqlite3",
15
+ "NAME": BASE_DIR / "db.sqlite3",
16
+ }
17
}
-}
0 commit comments