Ticket #3818: context_settings.diff
File context_settings.diff, 1.1 KB (added by , 15 years ago) |
---|
-
django/conf/global_settings.py
168 168 # 'django.core.context_processors.request', 169 169 ) 170 170 171 TEMPLATE_CONTEXT_SETTINGS = ( 172 'MEDIA_URL', 173 'ADMIN_MEDIA_PREFIX', 174 'LANGUAGE_CODE', 175 ) 176 171 177 # Output to use in template system for invalid (e.g. misspelled) variables. 172 178 TEMPLATE_STRING_IF_INVALID = '' 173 179 -
django/core/context_processors.py
57 57 def request(request): 58 58 return {'request': request} 59 59 60 def exposed_settings(request): 61 context_settings = dict() 62 for x in settings.TEMPLATE_CONTEXT_SETTINGS: 63 context_settings[x] = getattr(settings, x) 64 return {'settings': context_settings} 65 60 66 # PermWrapper and PermLookupDict proxy the permissions system into objects that 61 67 # the template system can understand. 62 68