Ticket #3192: dict-from-context-processor.diff

File dict-from-context-processor.diff, 553 bytes (added by Jeremy Dunck <jdunck@…>, 18 years ago)
  • template/context.py

     
    9494        else:
    9595            processors = tuple(processors)
    9696        for processor in get_standard_processors() + processors:
    97             self.update(processor(request))
     97            d = processor(request)
     98            if not hasattr(d, '__getitem__'):
     99                raise TypeError, 'Dictionary expected from context processor.'
     100            self.update(d)
Back to Top