id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 7034,get_nodes_by_type() fails if nodelist = None,kilian,nobody,"Using [http://toys.jacobian.org/hg/googlecharts/ Jacob's Google Charts templatetags], I've encountered a strange bug in the template systems. The `{% axis ""bottom"" hide %}` directive works fine in a stand-alone template, but fails if the template extends an other template. For instance, the following template (straight from the examples): {{{ {% extends ""base.html"" %} {% load charts %} {% chart %} {% chart-size ""300x200"" %} {% chart-type ""line"" %} {% chart-data ""1,5,2,10"" %} {% axis ""left"" %} {% axis-range ""0"" ""10"" %} {% endaxis %} {% axis ""left"" hide %} {% endchart %} }}} raises the following exception: {{{ File ""/home/kilian/django/django/template/__init__.py"" in get_nodes_by_type 762. nodes.extend(node.get_nodes_by_type(nodetype)) File ""/home/kilian/django/django/template/__init__.py"" in get_nodes_by_type 741. nodes.extend(self.nodelist.get_nodes_by_type(nodetype)) Exception Type: AttributeError at /test/ Exception Value: 'NoneType' object has no attribute 'get_nodes_by_type' }}} If the `{% extends ""base.html"" %}` is removed from the template, then it works fine, and no exception is raised. It looks like, for some reason, the parsing of the `{% axis ""left"" hide %}` tag generates a Node whose `nodelist` attribute is not a !NodeList object. neither a list, but rather None. The attached patch proposes a solution to take care of this case. ",,closed,Template system,dev,,invalid,inheritance nodelist,,Unreviewed,1,0,0,0,0,0