merge 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 18 Sep 2009 07:57:28 +0200
branch3.5
changeset 3302 6526febd9151
parent 3301 1050fcfdb5cf (diff)
parent 3297 09fd65114a11 (current diff)
child 3303 f961392e7517
merge
--- a/server/serverctl.py	Thu Sep 17 17:06:22 2009 +0200
+++ b/server/serverctl.py	Fri Sep 18 07:57:28 2009 +0200
@@ -312,7 +312,7 @@
         # postgres specific stuff
         if driver == 'postgres':
             # install plpythonu/plpgsql language if not installed by the cube
-            langs = ('plpgsql',) if sys.platform == 'win32' else ('plpythonu', 'plpgsql') 
+            langs = sys.platform == 'win32' and ('plpgsql',) or ('plpythonu', 'plpgsql') 
             for extlang in langs:
                 helper.create_language(cursor, extlang)
         cursor.close()
--- a/web/formfields.py	Thu Sep 17 17:06:22 2009 +0200
+++ b/web/formfields.py	Fri Sep 18 07:57:28 2009 +0200
@@ -165,6 +165,7 @@
         try:
             return widget.render(form, self, renderer)
         except TypeError:
+            raise
             warn('widget.render now take the renderer as third argument, please update %s implementation'
                  % widget.__class__.__name__, DeprecationWarning)
             return widget.render(form, self)
--- a/web/views/treeview.py	Thu Sep 17 17:06:22 2009 +0200
+++ b/web/views/treeview.py	Fri Sep 18 07:57:28 2009 +0200
@@ -24,7 +24,7 @@
     css_classes = 'treeview widget'
     title = _('tree view')
 
-    def call(self, subvid=None, treeid=None, initial_load=True, initial_thru_ajax=False):
+    def _init_params(self, subvid, treeid, initial_load, initial_thru_ajax):
         if subvid is None:
             subvid = self.req.form.pop('treesubvid', 'oneline') # consume it
         if treeid is None:
@@ -34,6 +34,11 @@
                 treeid = make_uid('throw away uid')
         toplevel_thru_ajax = self.req.form.pop('treeview_top', False) or initial_thru_ajax
         toplevel = toplevel_thru_ajax or (initial_load and not self.req.form.get('fname'))
+        return subvid, treeid, toplevel_thru_ajax, toplevel
+
+    def call(self, subvid=None, treeid=None, initial_load=True, initial_thru_ajax=False):
+        subvid, treeid, toplevel_thru_ajax, toplevel = self._init_params(
+            subvid, treeid, initial_load, initial_thru_ajax)
         ulid = ' '
         if toplevel:
             ulid = ' id="tree-%s"' % treeid