Commit 3e940cdf authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Simplify some code to have one loop, rather than two.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent a71bd3e0
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -814,10 +814,11 @@ class NodeList(list):
        bits = []
        for node in self:
            if isinstance(node, Node):
                bits.append(self.render_node(node, context))
                bit = self.render_node(node, context)
            else:
                bits.append(node)
        return mark_safe(u''.join([force_unicode(b) for b in bits]))
                bit = node
            bits.append(force_unicode(bit))
        return mark_safe(u''.join(bits))

    def get_nodes_by_type(self, nodetype):
        "Return a list of all nodes of the given type"