diff --git a/django/template/base.py b/django/template/base.py
index b608367..8d8ac35 100644
|
a
|
b
|
class Variable(object):
|
| 767 | 767 | for bit in self.lookups: |
| 768 | 768 | try: # dictionary lookup |
| 769 | 769 | current = current[bit] |
| 770 | | except (TypeError, AttributeError, KeyError, ValueError): |
| | 770 | except (TypeError, AttributeError, KeyError, ValueError, IndexError): |
| 771 | 771 | try: # attribute lookup |
| 772 | 772 | # Don't return class attributes if the class is the context: |
| 773 | 773 | if isinstance(current, BaseContext) and getattr(type(current), bit): |