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]: