From 05f2b7a2ef961b19381ed992dc3fcc19c2edc48c Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Thu, 24 Nov 2022 01:59:36 +0900 Subject: [PATCH] static r00t --- frogress/settings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frogress/settings.py b/frogress/settings.py index 86dec4f..f9275a6 100644 --- a/frogress/settings.py +++ b/frogress/settings.py @@ -16,6 +16,8 @@ env = environ.Env( SECURE_HSTS_PRELOAD=(bool, False), SESSION_COOKIE_SECURE=(bool, True), CSRF_COOKIE_SECURE=(bool, True), + STATIC_URL=(str, "/static/"), + STATIC_ROOT=(str, BASE_DIR / "static"), ) for stem in [".env.local", ".env"]: @@ -114,11 +116,10 @@ TIME_ZONE = "UTC" USE_I18N = True USE_TZ = True - # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.0/howto/static-files/ - -STATIC_URL = "static/" +STATIC_URL = env("STATIC_URL") +STATIC_ROOT = env("STATIC_ROOT") # Default primary key field type # https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field