From f264d10cb844167eaf1c538080a9a2faaccea2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhn-Vitus=20Sa=C3=9F?= Date: Sun, 6 Apr 2025 22:24:15 +0200 Subject: [PATCH] Ignore Missing Files --- django/core/settings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/django/core/settings.py b/django/core/settings.py index d9525dd..162b0f8 100644 --- a/django/core/settings.py +++ b/django/core/settings.py @@ -142,8 +142,11 @@ STATIC_URL = '/static/' STATIC_ROOT = BASE_DIR / "staticfiles" STATICFILES_DIRS = [BASE_DIR / 'static'] -# Exclude development CSS files from collectstatic -STATICFILES_IGNORE_PATTERNS = ['t-input.css'] +# WhiteNoise configuration +STATICFILES_STORAGE = 'whitenoise.storage.CompressedStaticFilesStorage' +WHITENOISE_SKIP_COMPRESS_EXTENSIONS = ['css', 'js'] +# Return 404 instead of 500 for missing files +WHITENOISE_MISSING_FILE_ERRNO = None # Default primary key field type # https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field