ajout du fichier version

This commit is contained in:
2024-07-21 04:18:16 +02:00
parent cd7d240261
commit 452a7a4a34
2 changed files with 11 additions and 2 deletions

View File

@@ -17,6 +17,14 @@ from config.server_config import *
# Build paths inside the project like this: BASE_DIR / 'subdir'. # Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent BASE_DIR = Path(__file__).resolve().parent.parent
VERSION_FILE_PATH = os.path.join(BASE_DIR, 'version')
try:
with open(VERSION_FILE_PATH) as version_file:
VERSION = version_file.read().strip()
except FileNotFoundError:
VERSION = "unknown"
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
@@ -221,10 +229,10 @@ JAZZMIN_SETTINGS = {
"site_title": "ClercNet-Admin", "site_title": "ClercNet-Admin",
# Title on the login screen (19 chars max) (defaults to current_admin_site.site_header if absent or None) # Title on the login screen (19 chars max) (defaults to current_admin_site.site_header if absent or None)
"site_header": "ClercNet v3.0", "site_header": f"ClercNet {VERSION}",
# Title on the brand (19 chars max) (defaults to current_admin_site.site_header if absent or None) # Title on the brand (19 chars max) (defaults to current_admin_site.site_header if absent or None)
"site_brand": "ClercNet v3", "site_brand": f"ClercNet {VERSION}",
# Logo to use for your site, must be present in static files, used for brand on top left # Logo to use for your site, must be present in static files, used for brand on top left
"site_logo": "img/logo_clerc_200.png", "site_logo": "img/logo_clerc_200.png",

1
VERSION Normal file
View File

@@ -0,0 +1 @@
v3.1.1