diff --git a/munkiwebadmin/settings.py b/munkiwebadmin/settings.py index 42e506f..79f7ee9 100755 --- a/munkiwebadmin/settings.py +++ b/munkiwebadmin/settings.py @@ -89,6 +89,7 @@ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', + 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.common.CommonMiddleware', @@ -239,7 +240,8 @@ } } -# needed by django-wsgiserver when using staticserve=collectstatic + +STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') # Additional locations of static files STATICFILES_DIRS = ( diff --git a/requirements.txt b/requirements.txt index 4b79ea3..8a49d4c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,6 @@ django==4.2.13 psycopg2-binary==2.9.9 gunicorn==22.0.0 -mysqlclient==2.2.4 django-cors-headers==4.3.1 requests==2.32.3 djangorestframework==3.15.1 @@ -9,4 +8,5 @@ django-auth-adfs==1.14.0 setuptools==70.0.0 python-ldap==3.4.4 django-auth-ldap==4.8.0 -azure-storage-blob==12.20.0 \ No newline at end of file +azure-storage-blob==12.20.0 +whitenoise==6.7.0 \ No newline at end of file diff --git a/requirements_azure.txt b/requirements_azure.txt index 51b3d37..b44ee88 100644 --- a/requirements_azure.txt +++ b/requirements_azure.txt @@ -6,4 +6,5 @@ requests==2.32.3 djangorestframework==3.15.1 django-auth-adfs==1.14.0 setuptools==70.0.0 -azure-storage-blob==12.20.0 \ No newline at end of file +azure-storage-blob==12.20.0 +whitenoise==6.7.0 \ No newline at end of file diff --git a/requirements_docker.txt b/requirements_docker.txt index 4b79ea3..b87b123 100644 --- a/requirements_docker.txt +++ b/requirements_docker.txt @@ -9,4 +9,5 @@ django-auth-adfs==1.14.0 setuptools==70.0.0 python-ldap==3.4.4 django-auth-ldap==4.8.0 -azure-storage-blob==12.20.0 \ No newline at end of file +azure-storage-blob==12.20.0 +whitenoise==6.7.0 \ No newline at end of file