Skip to content

Commit

Permalink
update for whitenoise
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Küng committed Jun 26, 2024
1 parent 256d709 commit 46289e2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion munkiwebadmin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down Expand Up @@ -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 = (
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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
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
azure-storage-blob==12.20.0
whitenoise==6.7.0
3 changes: 2 additions & 1 deletion requirements_azure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
azure-storage-blob==12.20.0
whitenoise==6.7.0
3 changes: 2 additions & 1 deletion requirements_docker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
azure-storage-blob==12.20.0
whitenoise==6.7.0

0 comments on commit 46289e2

Please sign in to comment.