1
Fork 0

Inject settings into template context

This commit is contained in:
Jake Howard 2020-04-13 10:42:21 +01:00
parent d5c04c7dee
commit a0cddae1c7
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,5 @@
from django.conf import settings
def settings_injector(request=None):
return {"settings": settings}

View file

@ -61,6 +61,7 @@ TEMPLATES = [
"context_processors": [ "context_processors": [
"django.template.context_processors.debug", "django.template.context_processors.debug",
"django.template.context_processors.request", "django.template.context_processors.request",
"website.common.context_processors.settings_injector",
], ],
}, },
}, },