Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3e940cdfd964bc37b1868b53a346308f66f995c1 1 parent a71bd3e
@alex alex authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/template/
7 django/template/
@@ -814,10 +814,11 @@ def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
- bits.append(self.render_node(node, context))
+ bit = self.render_node(node, context)
- 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"
Please sign in to comment.
Something went wrong with that request. Please try again.