add debug setting for static url

This commit is contained in:
2021-05-23 13:38:10 +00:00
parent ce4292c1db
commit 2c2582ece3

View File

@@ -192,7 +192,10 @@ SITE_ID = 1
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.0/howto/static-files/ # 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")] STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
STATIC_ROOT = "assets/" STATIC_ROOT = "assets/"