web/views/plots.py
changeset 10688 fa29f3628a1b
parent 10669 155c29e0ed1c
--- a/web/views/plots.py	Wed Sep 16 11:28:07 2015 +0200
+++ b/web/views/plots.py	Wed Sep 16 13:57:21 2015 +0200
@@ -20,6 +20,7 @@
 __docformat__ = "restructuredtext en"
 from cubicweb import _
 
+from six import add_metaclass
 from six.moves import range
 
 from logilab.common.date import datetime2ticks
@@ -85,9 +86,10 @@
     def _render(self, *args, **kwargs):
         raise NotImplementedError
 
+
+@add_metaclass(class_deprecated)
 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');
@@ -139,8 +141,8 @@
                                      'dateformat': '"%s"' % fmt})
 
 
+@add_metaclass(class_deprecated)
 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')