access to rwidgets through uicfg, removing buggy import breaking bw compat on the way tls-sprint
authorsylvain.thenault@logilab.fr
Mon, 11 May 2009 18:02:04 +0200
branchtls-sprint
changeset 1734 e8673144bc74
parent 1733 94c36d679454
child 1735 07afba765926
access to rwidgets through uicfg, removing buggy import breaking bw compat on the way
entity.py
--- a/entity.py	Mon May 11 17:50:17 2009 +0200
+++ b/entity.py	Mon May 11 18:02:04 2009 +0200
@@ -46,7 +46,6 @@
 
 try:
     from cubicweb.web import formwidgets, uicfg
-    from cubicweb.web.views.editforms import AutomaticEntityForm
 
     def _dispatch_rtags(tags, rtype, role, stype, otype):
         for tag in tags:
@@ -60,6 +59,7 @@
                 raise ValueError(tag)
 
 except ImportError:
+
     _dispatch_rtags = None
 
 def _get_etype(bases, classdict):
@@ -128,7 +128,7 @@
                         wdgname = 'TextInput'
                     widget = getattr(formwidgets, wdgname)
                     assert hasattr(widget, 'render')
-                    AutomaticEntityForm.rwidgets.tag_relation(
+                    uicfg.rwidgets.tag_relation(
                         etype, rtype, '*', widget, tagged='subject')
         return super(_metaentity, mcs).__new__(mcs, name, bases, classdict)