[view, plot] deprecate flot and encourage usage of the jqplot cube (closes #1625218)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 07 Oct 2011 11:56:04 +0200
changeset 7919 ae3307cac44e
parent 7918 d59db6068731
child 7920 5146c63e8e34
[view, plot] deprecate flot and encourage usage of the jqplot cube (closes #1625218)
web/views/plots.py
--- a/web/views/plots.py	Thu Oct 06 18:23:01 2011 +0200
+++ b/web/views/plots.py	Fri Oct 07 11:56:04 2011 +0200
@@ -21,6 +21,7 @@
 _ = unicode
 
 from logilab.common.date import datetime2ticks
+from logilab.common.deprecation import class_deprecated
 from logilab.mtconverter import xml_escape
 
 from cubicweb.utils import UStringIO, json_dumps
@@ -84,6 +85,8 @@
 
 class FlotPlotWidget(PlotWidget):
     """PlotRenderer widget using Flot"""
+    __metaclass__ = class_deprecated
+    __deprecation_warning__ = '[3.14] cubicweb.web.views.plots module is deprecated, use the jqplot cube instead'
     onload = u"""
 var fig = jQuery('#%(figid)s');
 if (fig.attr('cubicweb:type') != 'prepared-plot') {
@@ -135,6 +138,8 @@
 
 
 class PlotView(baseviews.AnyRsetView):
+    __metaclass__ = class_deprecated
+    __deprecation_warning__ = '[3.14] cubicweb.web.views.plots module is deprecated, use the jqplot cube instead'
     __regid__ = 'plot'
     title = _('generic plot')
     __select__ = multi_columns_rset() & all_columns_are_numbers()