--- a/cwvreg.py Mon Aug 31 14:26:44 2009 +0200
+++ b/cwvreg.py Mon Aug 31 14:27:16 2009 +0200
@@ -16,12 +16,18 @@
from cubicweb import (ETYPE_NAME_MAP, Binary, UnknownProperty, UnknownEid,
ObjectNotFound, NoSelectableObject, RegistryNotFound,
- RegistryOutOfDate, CW_EVENT_MANAGER)
+ RegistryOutOfDate, CW_EVENT_MANAGER, onevent)
from cubicweb.utils import dump_class
from cubicweb.vregistry import VRegistry, Registry
from cubicweb.rtags import RTAGS
+@onevent('before-registry-reload')
+def clear_rtag_objects():
+ for rtag in RTAGS:
+ rtag.clear()
+
+
def use_interfaces(obj):
"""return interfaces used by the given object by searchinf for implements
selectors, with a bw compat fallback to accepts_interfaces attribute
--- a/web/uicfg.py Mon Aug 31 14:26:44 2009 +0200
+++ b/web/uicfg.py Mon Aug 31 14:27:16 2009 +0200
@@ -67,7 +67,7 @@
"""
__docformat__ = "restructuredtext en"
-from cubicweb import neg_role, onevent
+from cubicweb import neg_role
from cubicweb.rtags import (RelationTags, RelationTagsBool,
RelationTagsSet, RelationTagsDict)
from cubicweb.web import formwidgets
@@ -216,14 +216,3 @@
actionbox_appearsin_addmenu = RelationTagsBool('actionbox_appearsin_addmenu',
init_actionbox_appearsin_addmenu)
-
-@onevent('before-registry-reload')
-def clear_rtag_objects():
- primaryview_section.clear()
- primaryview_display_ctrl.clear()
- autoform_section.clear()
- autoform_field.clear()
- autoform_field_kwargs.clear()
- autoform_is_inlined.clear()
- autoform_permissions_overrides.clear()
- actionbox_appearsin_addmenu.clear()