From d7d780f0d345bf61803f07cf85b85f4631b99373 Mon Sep 17 00:00:00 2001 From: Philippe MILINK Date: Thu, 5 May 2022 20:03:15 +0200 Subject: [PATCH] =?UTF-8?q?Corrige=20la=20version=20de=20Django=20affich?= =?UTF-8?q?=C3=A9e=20sur=20la=20page=20"=C3=80=20propos"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Récupére dynamiquement la version pour ne pas avoir à le faire pour les prochaines mises à jour. Également pour la version de Python. --- templates/pages/about.html | 4 ++-- zds/pages/views.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/pages/about.html b/templates/pages/about.html index e89f3b32c1..7ea5b7cfcf 100644 --- a/templates/pages/about.html +++ b/templates/pages/about.html @@ -72,8 +72,8 @@

{% trans "Système / Back-end" %}

{% trans "Site" %}

HTTP(S) + WSGI

diff --git a/zds/pages/views.py b/zds/pages/views.py index 7bbe3ac112..07974a01ea 100644 --- a/zds/pages/views.py +++ b/zds/pages/views.py @@ -1,6 +1,8 @@ import random from datetime import datetime +import sys +import django from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required @@ -66,6 +68,8 @@ def about(request): "default_repository_url": get_repository_url( settings.ZDS_APP["github_projects"]["default_repository"], "base_url" ), + "django_major_version": django.VERSION[0], + "python_major_version": sys.version_info.major, }, )