From 1a0c74bfa22b3a769fec97caf2a17656d2ed0a03 Mon Sep 17 00:00:00 2001
From: "Adrian A. Baumann"
Date: Mon, 19 Jan 2026 13:26:26 +0100
Subject: [PATCH] Static file serving out of DEBUG mode addressed
---
VorgabenUI/settings.py | 2 ++
VorgabenUI/urls.py | 4 +---
argocd/deployment.yaml | 2 +-
pages/templates/base.html | 2 +-
requirements.txt | 1 +
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/VorgabenUI/settings.py b/VorgabenUI/settings.py
index bcb211c..9ad8140 100644
--- a/VorgabenUI/settings.py
+++ b/VorgabenUI/settings.py
@@ -58,6 +58,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+ 'whitenoise',
'dokumente',
'abschnitte',
'stichworte',
@@ -69,6 +70,7 @@ INSTALLED_APPS = [
]
MIDDLEWARE = [
+ 'whitenoise.middleware.WhiteNoiseMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
diff --git a/VorgabenUI/urls.py b/VorgabenUI/urls.py
index 5c568c7..64d031e 100644
--- a/VorgabenUI/urls.py
+++ b/VorgabenUI/urls.py
@@ -40,9 +40,7 @@ urlpatterns = [
path('password_change/done/', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'), name='password_change_done'),
]
-# Serve static files
-urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
-
# Serve media files (including cached diagrams)
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+ urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml
index a8ec9d5..f0b7afa 100644
--- a/argocd/deployment.yaml
+++ b/argocd/deployment.yaml
@@ -25,7 +25,7 @@ spec:
mountPath: /data
containers:
- name: web
- image: git.baumann.gr/adebaumann/vui:0.978
+ image: git.baumann.gr/adebaumann/vui:0.979
imagePullPolicy: Always
env:
# Secret configuration
diff --git a/pages/templates/base.html b/pages/templates/base.html
index 7c09a8f..af8ebf7 100644
--- a/pages/templates/base.html
+++ b/pages/templates/base.html
@@ -219,7 +219,7 @@
-
Version {{ version|default:"0.978" }}
+
Version {{ version|default:"0.979" }}
diff --git a/requirements.txt b/requirements.txt
index e1669db..5c1cc5f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -34,3 +34,4 @@ urllib3==2.6.3
wcwidth==0.2.13
bleach==6.1.0
coverage==7.6.1
+whitenoise==6.8.2