From ca2bd4064a157f91bfaa8357139b9da24c0d911f Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Thu, 4 Jul 2024 17:15:36 +0200 Subject: [PATCH] Add TESTING to the context --- app/context_processors.py | 5 +++++ app/settings.py | 1 + 2 files changed, 6 insertions(+) create mode 100644 app/context_processors.py diff --git a/app/context_processors.py b/app/context_processors.py new file mode 100644 index 0000000..a123600 --- /dev/null +++ b/app/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings + + +def site_context(request): + return {"TESTING": settings.TESTING} diff --git a/app/settings.py b/app/settings.py index 321cc8e..5fa6b24 100644 --- a/app/settings.py +++ b/app/settings.py @@ -102,6 +102,7 @@ "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", + "app.context_processors.site_context", ], }, }