Author: Alex
Date: 2011-10-11 13:43:11 -0700 (Tue, 11 Oct 2011)
New Revision: 16959
Modified:
django/trunk/django/template/base.py
Log:
Simplify some code to have one loop, rather than two.
Modified: django/trunk/django/template/base.py
===================================================================
--- django/trunk/django/template/base.py 2011-10-11 18:23:08 UTC (rev
16958)
+++ django/trunk/django/template/base.py 2011-10-11 20:43:11 UTC (rev
16959)
@@ -814,10 +814,11 @@
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"
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.