diff MoinMoin/stats/hitcounts.py @ 68:0bbc39b09f95

optimize backup by sorting, refactor some easy stuff to use redirectedOutput imported from: moin--main--1.5--patch-70
author Thomas Waldmann <tw@waldmann-edv.de>
date Mon, 03 Oct 2005 08:41:37 +0000
parents 55ff4feb0f59
children a54cebaab73e
line wrap: on
line diff
--- a/MoinMoin/stats/hitcounts.py	Sun Oct 02 06:39:02 2005 +0000
+++ b/MoinMoin/stats/hitcounts.py	Mon Oct 03 08:41:37 2005 +0000
@@ -136,7 +136,6 @@
 def text(pagename, request, params=''):
     from MoinMoin.util.dataset import TupleDataset, Column
     from MoinMoin.widget.browser import DataBrowserWidget
-    from cStringIO import StringIO
     _ = request.getText
 
     # check params
@@ -182,14 +181,9 @@
             se = 0.0
             sd = 0.0
 
-    buffer = StringIO()
-    request.redirect(buffer)
     table = DataBrowserWidget(request)
     table.setData(hits)
-    table.render()
-    request.redirect()
-
-    return buffer.getvalue()
+    return table.toHTML()
 
 
 def draw(pagename, request):