--- a/utils.py Tue Jul 29 15:45:04 2014 +0200
+++ b/utils.py Tue Jul 22 15:42:47 2014 +0200
@@ -420,6 +420,8 @@
self.head = req.html_headers
# main stream
self.body = UStringIO()
+ # this method will be assigned to self.w in views
+ self.write = self.body.write
self.doctype = u''
self._htmlattrs = [('lang', req.lang)]
# keep main_stream's reference on req for easier text/html demoting
@@ -445,11 +447,6 @@
warn('[3.17] xhtml is no more supported',
DeprecationWarning, stacklevel=2)
- def write(self, data):
- """StringIO interface: this method will be assigned to self.w
- """
- self.body.write(data)
-
@property
def htmltag(self):
attrs = ' '.join('%s="%s"' % (attr, xml_escape(value))