From 11f3c5bcd94ee39e26cbbdf24c1ee7655d4b992a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 30 Dec 2018 19:41:13 +0100 Subject: [PATCH] Begin to add static files support --- ungleichotpserver/settings.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ungleichotpserver/settings.py b/ungleichotpserver/settings.py index c540505..885d3bb 100644 --- a/ungleichotpserver/settings.py +++ b/ungleichotpserver/settings.py @@ -103,7 +103,6 @@ REST_FRAMEWORK = { - # Internationalization # https://docs.djangoproject.com/en/2.1/topics/i18n/ @@ -142,8 +141,18 @@ DATABASES = { } } +# Static files +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +print(BASE_DIR) +STATIC_ROOT = os.path.join(BASE_DIR, "static")) +STATIC_URL = '/static/' + + + if "DEBUG" in os.environ: DEBUG = True ALLOWED_HOSTS = [] DATABASES = DEBUG_DATABASES + +else: