[sparql] fix an url generation bug breaking sparqlxml results view + remove a deprecation warning stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 19 Jan 2011 08:39:09 +0100
branchstable
changeset 6841 f04df13fc851
parent 6840 fe5162da6e70
child 6842 117b53c10d79
child 6843 b70a26ca271c
[sparql] fix an url generation bug breaking sparqlxml results view + remove a deprecation warning
web/views/sparql.py
--- a/web/views/sparql.py	Mon Jan 17 16:56:18 2011 +0100
+++ b/web/views/sparql.py	Wed Jan 19 08:39:09 2011 +0100
@@ -52,7 +52,7 @@
     __regid__ = 'sparql'
     def call(self):
         form = self._cw.vreg['forms'].select('sparql', self._cw)
-        self.w(form.render())
+        form.render(w=self.w)
         sparql = self._cw.form.get('sparql')
         vid = self._cw.form.get('resultvid', 'table')
         if sparql:
@@ -67,7 +67,7 @@
             else:
                 rql, args = qinfo.finalize()
                 if vid == 'sparqlxml':
-                    url = self._cw.build_url('view', rql=(rql,args), vid=vid)
+                    url = self._cw.build_url('view', rql=rql % args, vid=vid)
                     raise Redirect(url)
                 rset = self._cw.execute(rql, args)
                 self.wview(vid, rset, 'null')