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 b87987d commit e528122Copy full SHA for e528122
pod/main/settings.py
@@ -5,7 +5,6 @@
5
"""
6
7
import os
8
-import socket
9
10
##
11
# flatpages
@@ -81,11 +80,11 @@
81
80
# to be used with Django.
82
#
83
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
84
-hostname = socket.gethostname()
+default_db = "db.{instance}.sqlite3".format(instance=os.environ["POD_INSTANCE"]) if os.getenv("POD_INSTANCE") else "db.sqlite3"
85
DATABASES = {
86
"default": {
87
"ENGINE": "django.db.backends.sqlite3",
88
- "NAME": os.path.join(BASE_DIR, f"db.{hostname}.sqlite3"),
+ "NAME": os.path.join(BASE_DIR, default_db),
89
}
90
91
0 commit comments