Skip to content

Commit 19c1b6f

Browse files
committed
development database depends on the hostname
1 parent 4f51dae commit 19c1b6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pod/main/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"""
66

77
import os
8+
import socket
89

910
##
1011
# flatpages
@@ -80,10 +81,11 @@
8081
# to be used with Django.
8182
#
8283
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
84+
hostname = socket.gethostname()
8385
DATABASES = {
8486
"default": {
8587
"ENGINE": "django.db.backends.sqlite3",
86-
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
88+
"NAME": os.path.join(BASE_DIR, f"db.{hostname}.sqlite3"),
8789
}
8890
}
8991

0 commit comments

Comments
 (0)