Ticket #13841: ticket13841.diff

File ticket13841.diff, 875 bytes (added by Simon Litchfield, 14 years ago)
  • template/context.py

     
     1from inspect import getargspec
    12from django.core.exceptions import ImproperlyConfigured
    23from django.utils.importlib import import_module
    34
     
    147148        else:
    148149            processors = tuple(processors)
    149150        for processor in get_standard_processors() + processors:
    150             self.update(processor(request))
     151            if not hasattr(processor, 'pass_context'):
     152                arginfo = getargspec(processor)
     153                processor.pass_context = len(arginfo[0]) > 1
     154            if processor.pass_context:
     155                self.update(processor(request, context=self))
     156            else:
     157                self.update(processor(request))
     158           
Back to Top