Ticket #23489: 23489.diff

File 23489.diff, 710 bytes (added by Tim Graham, 10 years ago)
  • django/template/base.py

    diff --git a/django/template/base.py b/django/template/base.py
    index b608367..8d8ac35 100644
    a b class Variable(object):  
    767767            for bit in self.lookups:
    768768                try:  # dictionary lookup
    769769                    current = current[bit]
    770                 except (TypeError, AttributeError, KeyError, ValueError):
     770                except (TypeError, AttributeError, KeyError, ValueError, IndexError):
    771771                    try:  # attribute lookup
    772772                        # Don't return class attributes if the class is the context:
    773773                        if isinstance(current, BaseContext) and getattr(type(current), bit):
Back to Top