Removed unnecessary custom context processor exposing a variable that another context processor,django.template.context_processors.debug , already exposes.

This commit is contained in:
Arnav Choudhury 2021-02-04 15:51:35 +05:30
parent fc01e870bd
commit 861dadc81f
2 changed files with 0 additions and 9 deletions

View File

@ -198,7 +198,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",
],
},
}

View File

@ -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}