mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-17 14:47:08 +00:00
gethostname
This commit is contained in:
12
settings.py
12
settings.py
@@ -1,5 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
from socket import gethostname
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Django settings for troggle project.
|
Django settings for troggle project.
|
||||||
@@ -12,12 +13,15 @@ https://docs.djangoproject.com/en/dev/ref/settings/
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
print("* importing troggle/settings.py")
|
print("* importing troggle/settings.py")
|
||||||
if 'runserver' in sys.argv:
|
HOSTNAME = gethostname() # "expo" on expo.survex.com
|
||||||
print(">>>>running on dev local runserver<<<<")
|
print(f">>>>running on {HOSTNAME}<<<<")
|
||||||
DEVSERVER = True
|
if HOSTNAME == "expo":
|
||||||
else:
|
|
||||||
# print(">>>>running on expo.survex.com<<<<")
|
# print(">>>>running on expo.survex.com<<<<")
|
||||||
DEVSERVER = False
|
DEVSERVER = False
|
||||||
|
else:
|
||||||
|
print(">>>>running on dev machine<<<<")
|
||||||
|
DEVSERVER = True
|
||||||
|
|
||||||
|
|
||||||
EPOCH = date.fromisoformat('1970-01-01')
|
EPOCH = date.fromisoformat('1970-01-01')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user