Commit adee89f5 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

add a global template context

parent b723427a
import types
from config.settings import parse_bool
import config.env
GLOBAL_CONTEXT = types.MappingProxyType({
})
def global_context(request):
"""This global context is imported in every rendered template"""
return GLOBAL_CONTEXT
...@@ -220,6 +220,7 @@ TEMPLATES = [ ...@@ -220,6 +220,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',
'main.context_processors.global_context',
], ],
}, },
}, },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment