# HG changeset patch
# User Rémi Cardona <remi.cardona@logilab.fr>
# Date 1414682416 -3600
#      Thu Oct 30 16:20:16 2014 +0100
# Node ID 1eb85791a7fa55af5ec8a2ae9d60e8dccbb1a7b4
# Parent  56190bc5ea4811d66adb6e5070335c1ac260b34d
[basetemplate] Use a proper UStringIO instead of a simple list for components (closes #4542740)

This allows writing components using cwtags which monkeypatches
CubicWeb's UStringIO for correct operations.

This fixes a regression introduced by commit 45b3eb604765.

diff --git a/views/basetemplates.py b/views/basetemplates.py
--- a/views/basetemplates.py
+++ b/views/basetemplates.py
@@ -116,14 +116,15 @@
 @monkeypatch(basetemplates.TheMainTemplate)
 def nav_column(self, view, boxes, context):
     if boxes:
-        html = []
+        stream = UStringIO()
         for box in boxes:
-            box.render(w=html.append, view=view)
+            box.render(w=stream.write, view=view)
+        html = stream.getvalue()
         if html:
             # only display aside columns if html availble
             self.w(u'<aside id="aside-main-%s" class="col-md-3 cwjs-aside">\n' %
                    context)
-            self.w(u'\n'.join(html))
+            self.w(html)
             self.w(u'</aside>\n')
     return len(boxes)