Improving nodetree searching with support for IfNode and ForNode attributes.
[philo.git] / models.py
index 5089508..3a06d0a 100644 (file)
--- a/models.py
+++ b/models.py
@@ -240,8 +240,9 @@ class Template(TreeModel):
                                names = []
                                for node in nodelist:
                                        try:
                                names = []
                                for node in nodelist:
                                        try:
-                                               if hasattr(node, 'nodelist'):
-                                                       names.extend(nodelist_container_node_names(node.nodelist))
+                                               for nodelist_name in ('nodelist', 'nodelist_loop', 'nodelist_empty', 'nodelist_true', 'nodelist_false'):
+                                                       if hasattr(node, nodelist_name):
+                                                               names.extend(nodelist_container_node_names(getattr(node, nodelist_name)))
                                                if isinstance(node, ContainerNode):
                                                        names.append(node.name)
                                                elif isinstance(node, ExtendsNode):
                                                if isinstance(node, ContainerNode):
                                                        names.append(node.name)
                                                elif isinstance(node, ExtendsNode):