fix some deprecation warnings stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 18 May 2011 16:05:11 +0200
branchstable
changeset 7393 7824d61f41a2
parent 7390 be2fffc9ec17
child 7394 d11d88bd08e8
fix some deprecation warnings
web/views/basecontrollers.py
web/views/plots.py
web/views/sparql.py
--- a/web/views/basecontrollers.py	Mon May 16 21:41:50 2011 +0200
+++ b/web/views/basecontrollers.py	Wed May 18 16:05:11 2011 +0200
@@ -603,8 +603,8 @@
         errors = self._cw.cnx.undo_transaction(txuuid)
         if not errors:
             self.redirect()
-        return self._cw._('some errors occurred:') + self.view('pyvalist',
-                                                               pyvalue=errors)
+        return self._cw._('some errors occurred:') + self._cw.view(
+            'pyvalist', pyvalue=errors)
 
     def redirect(self):
         req = self._cw
--- a/web/views/plots.py	Mon May 16 21:41:50 2011 +0200
+++ b/web/views/plots.py	Wed May 18 16:05:11 2011 +0200
@@ -198,7 +198,7 @@
             for rowidx, (_, value) in enumerate(self.cw_rset):
                 if value is not None:
                     vid = self._guess_vid(rowidx)
-                    label = '%s: %s' % (self.view(vid, self.cw_rset, row=rowidx, col=0),
+                    label = '%s: %s' % (self._cw.view(vid, self.cw_rset, row=rowidx, col=0),
                                         value)
                     labels.append(label.encode(self._cw.encoding))
                     values.append(value)
--- a/web/views/sparql.py	Mon May 16 21:41:50 2011 +0200
+++ b/web/views/sparql.py	Wed May 18 16:05:11 2011 +0200
@@ -123,7 +123,7 @@
     def cell_binding(self, row, col, varname):
         celltype = self.cw_rset.description[row][col]
         if self._cw.vreg.schema.eschema(celltype).final:
-            cellcontent = self.view('cell', self.cw_rset, row=row, col=col)
+            cellcontent = self._cw.view('cell', self.cw_rset, row=row, col=col)
             return E.binding(E.literal(cellcontent,
                                        datatype=xmlschema(celltype)),
                              name=varname)