Ticket #1271: template_request.patch

File template_request.patch, 1.1 KB (added by Ivan Fedorov, 19 years ago)

patch for core/context_processors.py

  • django/conf/global_settings.py

     
    107107# Each one should be a callable that takes the request object as its
    108108# only parameter and returns a dictionary to add to the context.
    109109TEMPLATE_CONTEXT_PROCESSORS = (
     110    'django.core.context_processors.request',
    110111    'django.core.context_processors.auth',
    111112    'django.core.context_processors.debug',
    112113    'django.core.context_processors.i18n',
  • django/core/context_processors.py

     
    3838        context_extras['LANGUAGE_CODE'] = LANGUAGE_CODE
    3939    return context_extras
    4040
     41def request(request):
     42    return {'request': request}
     43
    4144# PermWrapper and PermLookupDict proxy the permissions system into objects that
    4245# the template system can understand.
    4346
Back to Top