fix: avoid cached static hash urls
All checks were successful
Build and Push Docker Image / build (push) Successful in 26s

This commit is contained in:
2026-04-21 12:44:47 +02:00
parent bba8fdf2a2
commit 3838fa2480
2 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
SECRET_KEY=replace-me
DEBUG=false
LOG_LEVEL=info
WHITENOISE_USE_MANIFEST=false
WHITENOISE_MANIFEST_STRICT=false
ALLOWED_HOSTS=example.com,www.example.com
CSRF_TRUSTED_ORIGINS=https://example.com,https://www.example.com

View File

@@ -265,6 +265,7 @@ STATICFILES_DIRS = [
STATIC_ROOT = BASE_DIR / 'staticfiles'
# Whitenoise storage for compressed static files
WHITENOISE_USE_MANIFEST = env_bool("WHITENOISE_USE_MANIFEST", False)
STORAGES = {
'default': {
'BACKEND': 'django.core.files.storage.FileSystemStorage',
@@ -273,12 +274,17 @@ STORAGES = {
'BACKEND': (
'django.contrib.staticfiles.storage.StaticFilesStorage'
if DEBUG else
'whitenoise.storage.CompressedManifestStaticFilesStorage'
(
'whitenoise.storage.CompressedManifestStaticFilesStorage'
if WHITENOISE_USE_MANIFEST else
'whitenoise.storage.CompressedStaticFilesStorage'
)
),
},
}
# Keep the app serving even if a deployment has a stale or incomplete manifest.
# This only matters when WHITENOISE_USE_MANIFEST=true.
WHITENOISE_MANIFEST_STRICT = env_bool("WHITENOISE_MANIFEST_STRICT", False)
# Default primary key field type