web/views/plots.py
branchtls-sprint
changeset 742 99115e029dca
parent 0 b97547f5f1fa
child 1132 96752791c2b6
--- a/web/views/plots.py	Wed Feb 18 00:48:24 2009 +0100
+++ b/web/views/plots.py	Wed Feb 18 01:21:25 2009 +0100
@@ -2,8 +2,10 @@
 
 from logilab.common import flatten
 
+from cubicweb.vregistry import objectify_selector
 from cubicweb.web.views import baseviews
 
+@objectify_selector
 def plot_selector(cls, req, rset, *args, **kwargs):
     """accept result set with at least one line and two columns of result
     all columns after second must be of numerical types"""
@@ -34,7 +36,7 @@
         binary = True
         content_type = 'image/png'
         _plot_count = 0
-        __selectors__ = (plot_selector,)
+        __select__ = plot_selector()
 
         def call(self, width=None, height=None):
             # compute dimensions