Добавил whitenoise
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user