From 2c2582ece328050599a1253edfb9b5825f6131c2 Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 23 May 2021 13:38:10 +0000 Subject: [PATCH] add debug setting for static url --- fet2020/fet2020/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fet2020/fet2020/settings.py b/fet2020/fet2020/settings.py index dce3ac71..24d1499c 100644 --- a/fet2020/fet2020/settings.py +++ b/fet2020/fet2020/settings.py @@ -192,7 +192,10 @@ SITE_ID = 1 # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.0/howto/static-files/ -STATIC_URL = "/assets/" +if DEBUG: + STATIC_URL = "/static/" +else: + STATIC_URL = "/assets/" STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] STATIC_ROOT = "assets/"