diff --git a/Dockerfile b/Dockerfile index 9a0b276..40859f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.14 AS baustelle +FROM python:3.15-rc-trixie AS baustelle RUN mkdir /app WORKDIR /app ENV PYTHONDONTWRITEBYTECODE=1 @@ -7,12 +7,12 @@ RUN pip install --upgrade pip COPY requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt -FROM python:3.14-slim +FROM python:3.15-rc-slim-trixie RUN useradd -m -r appuser && \ mkdir /app && \ chown -R appuser /app -COPY --from=baustelle /usr/local/lib/python3.14/site-packages/ /usr/local/lib/python3.14/site-packages/ +COPY --from=baustelle /usr/local/lib/python3.15/site-packages/ /usr/local/lib/python3.15/site-packages/ COPY --from=baustelle /usr/local/bin/ /usr/local/bin/ RUN rm /usr/bin/tar /usr/lib/x86_64-linux-gnu/libncur* WORKDIR /app diff --git a/VorgabenUI/settings.py b/VorgabenUI/settings.py index 9ad8140..26a43c7 100644 --- a/VorgabenUI/settings.py +++ b/VorgabenUI/settings.py @@ -166,6 +166,12 @@ DIAGRAM_CACHE_DIR = 'diagram_cache' # relative to MEDIA_ROOT # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + +# Custom error pages +handler400 = 'pages.views.custom_400' +handler403 = 'pages.views.custom_403' +handler404 = 'pages.views.custom_404' +handler500 = 'pages.views.custom_500' DATA_UPLOAD_MAX_NUMBER_FIELDS=10250 NESTED_ADMIN_LAZY_INLINES = True diff --git a/argocd/deployment.yaml b/argocd/deployment.yaml index f0b7afa..cadee6d 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.979 + image: git.baumann.gr/adebaumann/vui:0.980 imagePullPolicy: Always env: # Secret configuration diff --git a/pages/templates/400.html b/pages/templates/400.html new file mode 100644 index 0000000..1fee269 --- /dev/null +++ b/pages/templates/400.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}Ungültige Anfrage{% endblock %} + +{% block content %} +
Ihre Anfrage konnte nicht verarbeitet werden.
+Bitte überprüfen Sie die eingegebenen Daten und versuchen Sie es erneut.
+ +Sie haben keine Berechtigung, auf diese Seite zuzugreifen.
+Bitte melden Sie sich an oder wenden Sie sich an den Administrator.
++ Zur Startseite + {% if not user.is_authenticated %} + Anmelden + {% endif %} +
+Die gewünschte Seite konnte nicht gefunden werden.
+Mögliche Gründe:
+Bei der Verarbeitung Ihrer Anfrage ist ein interner Fehler aufgetreten.
+Der Administrator wurde über dieses Problem informiert.
+ +Version {{ version|default:"0.979" }}
+Version {{ version|default:"0.980" }}