Removed unnecessary custom context processor exposing the DEBUG Template Context Variable (#3042)

This commit is contained in:
Arnav Choudhury 2021-11-22 19:26:09 +05:30 committed by GitHub
parent efdda66d2f
commit 0fc1f6804f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 9 deletions

View File

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

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}