Add universal context adder

newer-dal
LEdoian 4 years ago
parent 967fd4d55d
commit 92b20dd8a4

@ -0,0 +1,6 @@
import django
def universal_context(req):
return {
"GENERATOR": "Django " + ".".join(django.VERSION),
}

@ -65,6 +65,7 @@ TEMPLATES = [
'django.template.context_processors.request', 'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages', 'django.contrib.messages.context_processors.messages',
'utils.context_processors.universal_context',
], ],
}, },
}, },

Loading…
Cancel
Save