move initialize_varmaker on the FormMixIn class tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 08 Apr 2009 13:13:53 +0200
branchtls-sprint
changeset 1289 5eff2ef92977
parent 1288 0d0f09c36bba
child 1290 824f695ab344
move initialize_varmaker on the FormMixIn class
web/form.py
web/views/baseforms.py
--- a/web/form.py	Wed Apr 08 11:52:10 2009 +0200
+++ b/web/form.py	Wed Apr 08 13:13:53 2009 +0200
@@ -99,6 +99,12 @@
                     return True
         return False
     
+    def initialize_varmaker(self):
+        varmaker = self.req.get_page_data('rql_varmaker')
+        if varmaker is None:
+            varmaker = self.req.varmaker
+            self.req.set_page_data('rql_varmaker', varmaker)
+        self.varmaker = varmaker
 
     def button(self, label, klass='validateButton', tabindex=None, **kwargs):
         if tabindex is None:
--- a/web/views/baseforms.py	Wed Apr 08 11:52:10 2009 +0200
+++ b/web/views/baseforms.py	Wed Apr 08 13:13:53 2009 +0200
@@ -69,13 +69,6 @@
 </form>
 '''
 
-    def initialize_varmaker(self):
-        varmaker = self.req.get_page_data('rql_varmaker')
-        if varmaker is None:
-            varmaker = self.req.varmaker
-            self.req.set_page_data('rql_varmaker', varmaker)
-        self.varmaker = varmaker
-
     def cell_call(self, row, col, **kwargs):
         self.req.add_js( ('cubicweb.ajax.js', ) )
         entity = self.complete_entity(row, col)