Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 322 Bytes
from django.conf import settings
def context_settings(request):
"""Add whatever settings to the context"""
cxt = {}
for setting in getattr(settings, 'CONTEXT_SETTINGS', []):
try:
cxt[setting] = getattr(settings, setting)
except AttributeError:
continue
return cxt