diff --git a/core/settings/base.py b/core/settings/base.py index 98b0810..18aeb87 100644 --- a/core/settings/base.py +++ b/core/settings/base.py @@ -62,6 +62,7 @@ MIDDLEWARE = [ "corsheaders.middleware.CorsMiddleware", + 'whitenoise.middleware.WhiteNoiseMiddleware', "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", @@ -186,6 +187,10 @@ } +# Whitenoise Settings +STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' + + # CORS Settings CORS_ALLOW_ALL_ORIGINS = True CORS_ALLOWED_ORIGINS = [ diff --git a/requirements-base.txt b/requirements-base.txt index 5a02060..3d5f91c 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -37,3 +37,4 @@ typing_extensions==4.8.0 uritemplate==4.1.1 urllib3==2.0.4 zipp==3.17.0 +whitenoise==6.6.0 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5a02060..3d5f91c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,3 +37,4 @@ typing_extensions==4.8.0 uritemplate==4.1.1 urllib3==2.0.4 zipp==3.17.0 +whitenoise==6.6.0 \ No newline at end of file