From 2478ec95e85bcc2d93fbbfe745cb323daace33c2 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 15 Jun 2025 11:38:10 +0200 Subject: [PATCH] Update version to 0.2.0 and add version context processor for footer display --- base/templates/footer.html | 2 +- musik/context_processors.py | 5 +++++ musik/settings.py | 3 +++ pyproject.toml | 2 +- uv.lock | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 musik/context_processors.py diff --git a/base/templates/footer.html b/base/templates/footer.html index 552662c..52895f6 100644 --- a/base/templates/footer.html +++ b/base/templates/footer.html @@ -1 +1 @@ -© Edgar P. BurkhartMentions légales +Musik {{ VERSION }} – © Edgar P. BurkhartMentions légales diff --git a/musik/context_processors.py b/musik/context_processors.py new file mode 100644 index 0000000..de709cd --- /dev/null +++ b/musik/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings + + +def version(request): + return {"VERSION": settings.VERSION} diff --git a/musik/settings.py b/musik/settings.py index aeb5f91..764863f 100644 --- a/musik/settings.py +++ b/musik/settings.py @@ -13,6 +13,8 @@ https://docs.djangoproject.com/en/5.2/ref/settings/ import os from pathlib import Path +VERSION = "0.2.0" + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -71,6 +73,7 @@ TEMPLATES = [ "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", + "musik.context_processors.version", ], }, }, diff --git a/pyproject.toml b/pyproject.toml index ca8db5c..d29d983 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "musik" -version = "0.1.5" +version = "0.2.0" description = "Le jeu de Musik." readme = "README.md" requires-python = ">=3.12" diff --git a/uv.lock b/uv.lock index 33d4f69..e30935f 100644 --- a/uv.lock +++ b/uv.lock @@ -423,7 +423,7 @@ wheels = [ [[package]] name = "musik" -version = "0.1.5" +version = "0.2.0" source = { virtual = "." } dependencies = [ { name = "celery" },