changeset 1525:6efd969a704f

widget.browser: rename misleading 'toHTML' function name to 'format'
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 03 Sep 2006 20:39:01 +0200
parents 2564531181d8
children d33b42df2d36
files MoinMoin/widget/browser.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/widget/browser.py	Sun Sep 03 03:30:03 2006 +0200
+++ b/MoinMoin/widget/browser.py	Sun Sep 03 20:39:01 2006 +0200
@@ -22,7 +22,7 @@
         """
         self.data = dataset
 
-    def toHTML(self):
+    def format(self):
         fmt = self.request.formatter
 
         result = []
@@ -45,7 +45,8 @@
         while row:
             result.append(fmt.table_row(1))
             for idx in range(len(row)):
-                if self.data.columns[idx].hidden: continue
+                if self.data.columns[idx].hidden:
+                    continue
                 result.append(fmt.table_cell(1))
                 result.append(unicode(row[idx]))
                 result.append(fmt.table_cell(0))
@@ -55,7 +56,8 @@
         result.append(fmt.table(0))
         return ''.join(result)
 
+    toHTML = format # old name of "format" function DEPRECATED, will be removed in 1.7
 
     def render(self):
-        self.request.write(self.toHTML())
+        self.request.write(self.format())