Добавил whitenoise

This commit is contained in:
Viner Abubakirov
2026-01-03 01:41:55 +05:00
parent 75f0329edb
commit 6e2d6c250f
3 changed files with 16 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
# Custom middlewares
"core.middleware.current_request.CurrentRequestMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
]
ROOT_URLCONF = 'music_storage.urls'
@@ -132,6 +133,9 @@ STATIC_ROOT = BASE_DIR / 'staticfiles'
STATICFILES_DIRS = [
BASE_DIR / STATIC_URL
]
STATICFILES_STORAGE = (
"whitenoise.storage.CompressedManifestStaticFilesStorage"
)
STORAGES = {
# default storage for user uploads