Code

Ticket #3818: context_processors.diff

File context_processors.diff, 420 bytes (added by ciantic@…, 7 years ago)

exposed context processor that handles reading of settings in context wise

Line 
1Index: context_processors.py
2===================================================================
3--- context_processors.py       (revision 4824)
4+++ context_processors.py       (working copy)
5@@ -42,6 +42,12 @@
6 
7     return context_extras
8 
9+def exposed(request):
10+       dict = {}
11+       for name in settings.EXPOSE_SETTINGS:
12+               dict[name] = getattr(settings, name)
13+       return dict
14+
15 def request(request):
16     return {'request': request}
17