Add context processor for settings variables (#2203)

Add context processor for settings variables
This commit is contained in:
Bruno Alla 2019-09-11 22:50:53 +01:00 committed by GitHub
commit bb6320efc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -187,6 +187,7 @@ TEMPLATES = [
"django.template.context_processors.static", "django.template.context_processors.static",
"django.template.context_processors.tz", "django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages", "django.contrib.messages.context_processors.messages",
"{{ cookiecutter.project_slug }}.utils.context_processors.settings_context",
], ],
}, },
} }

View File

@ -0,0 +1,5 @@
from django.conf import settings
def settings_context(_request):
return {"settings": settings}