From 8c5120440ada8f09848765ec8ac196d24e0ac8a0 Mon Sep 17 00:00:00 2001 From: rlskoeser Date: Tue, 8 Oct 2024 17:56:55 -0400 Subject: [PATCH] Add INCLUDE_ANALYTICS setting to template context --- CHANGELOG.rst | 5 +++++ mep/__init__.py | 2 +- mep/context_processors.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d09169e7..51fdb8ee 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ CHANGELOG ========= +1.7.1 +----- + +- Add `INCLUDE_ANALYTICS` to template context so Plausible analytics can be enabled + 1.7 --- diff --git a/mep/__init__.py b/mep/__init__.py index 00d8fe3d..25d98543 100644 --- a/mep/__init__.py +++ b/mep/__init__.py @@ -1,4 +1,4 @@ -__version__ = "1.7.0" +__version__ = "1.7.1" # context processor to add version to the template environment diff --git a/mep/context_processors.py b/mep/context_processors.py index 9096b3b3..bc3b2dd6 100644 --- a/mep/context_processors.py +++ b/mep/context_processors.py @@ -15,6 +15,7 @@ def template_settings(request): "site": site, # needed for footer; easier to get here than in template "about_page": site.root_page.get_children().filter(slug="about").first(), + "INCLUDE_ANALYTICS": getattr(settings, "INCLUDE_ANALYTICS", False), "PLAUSIBLE_ANALYTICS_SCRIPT": getattr( settings, "PLAUSIBLE_ANALYTICS_SCRIPT", None ),