Inject settings into template context
This commit is contained in:
parent
d5c04c7dee
commit
a0cddae1c7
2 changed files with 6 additions and 0 deletions
5
website/common/context_processors.py
Normal file
5
website/common/context_processors.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
def settings_injector(request=None):
|
||||||
|
return {"settings": settings}
|
|
@ -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",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Reference in a new issue