Merge pull request #2694 from Andrew-Chen-Wang/patch-7

This commit is contained in:
Bruno Alla 2020-07-24 17:40:23 +01:00 committed by GitHub
commit e2910a3222
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,4 +2,7 @@ from django.conf import settings
def settings_context(_request):
return {"settings": settings}
"""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}