From fc258bd51ce0005a74c1817960e1ce375818f875 Mon Sep 17 00:00:00 2001 From: Dave Gaeddert Date: Fri, 21 Jun 2024 10:59:49 -0500 Subject: [PATCH] Add DEBUG to template context --- bolt/bolt/views/templates.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bolt/bolt/views/templates.py b/bolt/bolt/views/templates.py index b88cfd4a79..2fbecf9053 100644 --- a/bolt/bolt/views/templates.py +++ b/bolt/bolt/views/templates.py @@ -1,5 +1,6 @@ from bolt.csrf.middleware import get_token from bolt.exceptions import ImproperlyConfigured +from bolt.runtime import settings from bolt.templates import Template, TemplateFileMissing from bolt.utils.functional import lazy from bolt.utils.html import format_html @@ -31,6 +32,7 @@ def get_template_context(self) -> dict: "request": self.request, "csrf_input": csrf_input_lazy(self.request), "csrf_token": csrf_token_lazy(self.request), + "DEBUG": settings.DEBUG, } def get_template_names(self) -> list[str]: