skip deprecated URL widgets tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 07 Apr 2009 19:51:35 +0200
branchtls-sprint
changeset 1269 94a5c30575c0
parent 1268 5db94912650b
child 1270 53f35db66f88
skip deprecated URL widgets
entity.py
--- a/entity.py	Tue Apr 07 19:51:11 2009 +0200
+++ b/entity.py	Tue Apr 07 19:51:35 2009 +0200
@@ -124,6 +124,9 @@
             for name, widgets in _get_defs('widgets', name, bases, classdict):
                 warn('%s: widgets is deprecated' % name, DeprecationWarning)
                 for rtype, wdgname in widgets.iteritems():
+                    if wdgname in ('URLWidget', 'EmbededURLWidget'):
+                        warn('%s widget is deprecated' % wdgname, DeprecationWarning)
+                        continue
                     AutomaticEntityForm.rwidgets.set_rtag(wdgname, rtype, 'subject', etype)
         return super(metaentity, mcs).__new__(mcs, name, bases, classdict)