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