Loading django/template/base.py +3 −1 Original line number Diff line number Diff line Loading @@ -767,7 +767,9 @@ class Variable(object): for bit in self.lookups: try: # dictionary lookup current = current[bit] except (TypeError, AttributeError, KeyError, ValueError): # ValueError/IndexError are for numpy.array lookup on # numpy < 1.9 and 1.9+ respectively except (TypeError, AttributeError, KeyError, ValueError, IndexError): try: # attribute lookup # Don't return class attributes if the class is the context: if isinstance(current, BaseContext) and getattr(type(current), bit): Loading Loading
django/template/base.py +3 −1 Original line number Diff line number Diff line Loading @@ -767,7 +767,9 @@ class Variable(object): for bit in self.lookups: try: # dictionary lookup current = current[bit] except (TypeError, AttributeError, KeyError, ValueError): # ValueError/IndexError are for numpy.array lookup on # numpy < 1.9 and 1.9+ respectively except (TypeError, AttributeError, KeyError, ValueError, IndexError): try: # attribute lookup # Don't return class attributes if the class is the context: if isinstance(current, BaseContext) and getattr(type(current), bit): Loading