From 0fc1f6804f212748dee4c3ddc54a47c6be3916bd Mon Sep 17 00:00:00 2001 From: Arnav Choudhury Date: Mon, 22 Nov 2021 19:26:09 +0530 Subject: [PATCH] Removed unnecessary custom context processor exposing the DEBUG Template Context Variable (#3042) --- {{cookiecutter.project_slug}}/config/settings/base.py | 1 - .../utils/context_processors.py | 8 -------- 2 files changed, 9 deletions(-) delete mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index bbe45a39..e0d7fcb0 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -199,7 +199,6 @@ TEMPLATES = [ "django.template.context_processors.static", "django.template.context_processors.tz", "django.contrib.messages.context_processors.messages", - "{{ cookiecutter.project_slug }}.utils.context_processors.settings_context", ], }, } diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py deleted file mode 100644 index 3c535141..00000000 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/utils/context_processors.py +++ /dev/null @@ -1,8 +0,0 @@ -from django.conf import settings - - -def settings_context(_request): - """Settings available by default to the templates context.""" - # Note: we intentionally do NOT expose the entire settings - # to prevent accidental leaking of sensitive information - return {"DEBUG": settings.DEBUG}