entity.py
branchtls-sprint
changeset 1313 9cff1eee0208
parent 1269 94a5c30575c0
child 1360 13ae1121835e
--- a/entity.py	Thu Apr 09 12:35:03 2009 +0200
+++ b/entity.py	Thu Apr 09 12:37:00 2009 +0200
@@ -45,6 +45,7 @@
 CATEGORY_TAGS = set(('primary', 'secondary', 'generic', 'generated')) # , 'metadata'))
 
 try:
+    from cubicweb.web import formwidgets
     from cubicweb.web.views.editforms import AutomaticEntityForm
     from cubicweb.web.views.boxes import EditBox
 
@@ -127,6 +128,9 @@
                     if wdgname in ('URLWidget', 'EmbededURLWidget'):
                         warn('%s widget is deprecated' % wdgname, DeprecationWarning)
                         continue
+                    if wdgname == 'StringWidget':
+                        wdgname = 'TextInput'
+                    widget = getattr(formwidgets, wdgname)
                     AutomaticEntityForm.rwidgets.set_rtag(wdgname, rtype, 'subject', etype)
         return super(metaentity, mcs).__new__(mcs, name, bases, classdict)