update some selectors
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Thu, 08 Jan 2009 09:55:38 +0100
changeset 361 5cd8bc047b52
parent 360 600dd2fe8b40
child 363 9da036d0cced
update some selectors
common/mixins.py
common/view.py
--- a/common/mixins.py	Thu Jan 08 09:55:27 2009 +0100
+++ b/common/mixins.py	Thu Jan 08 09:55:38 2009 +0100
@@ -9,7 +9,7 @@
 
 from logilab.common.decorators import cached
 
-from cubicweb.common.selectors import interface_selector
+from cubicweb.common.selectors import implement_interface
 from cubicweb.interfaces import IWorkflowable, IEmailable, ITree
 
 
@@ -312,7 +312,7 @@
     """a recursive tree view"""
     id = 'tree'
     item_vid = 'treeitem'
-    __selectors__ = (interface_selector,)
+    __selectors__ = (implement_interface,)
     accepts_interfaces = (ITree,)
 
     def call(self, done=None, **kwargs):
--- a/common/view.py	Thu Jan 08 09:55:27 2009 +0100
+++ b/common/view.py	Thu Jan 08 09:55:38 2009 +0100
@@ -13,9 +13,8 @@
 
 from cubicweb import NotAnEntity, NoSelectableObject
 from cubicweb.common.registerers import accepts_registerer, priority_registerer
-from cubicweb.common.selectors import (in_group_selector, nonempty_rset, 
-                                       empty_rset, accept_selector,
-                                       none_rset, chainfirst)
+from cubicweb.common.selectors import (chainfirst, match_user_group, accept,
+                                       nonempty_rset, empty_rset, none_rset)
 from cubicweb.common.appobject import AppRsetObject, ComponentMixIn
 from cubicweb.common.utils import UStringIO, HTMLStream
 
@@ -300,7 +299,7 @@
     """base class for views applying on an entity (i.e. uniform result set)
     """
     __registerer__ = accepts_registerer
-    __selectors__ = (accept_selector,)
+    __selectors__ = (accept,)
     category = 'entityview'
     
     def field(self, label, value, row=True, show_label=True, w=None, tr=True):
@@ -323,7 +322,7 @@
     to be displayed (so they can always be displayed !)
     """
     __registerer__ = priority_registerer
-    __selectors__ = (in_group_selector, none_rset)
+    __selectors__ = (match_user_group, none_rset)
     require_groups = ()
     category = 'startupview'
     
@@ -345,7 +344,7 @@
     result set (usually a default rql is provided by the view class)
     """
     __registerer__ = accepts_registerer
-    __selectors__ = (chainfirst(none_rset, accept_selector),)
+    __selectors__ = (chainfirst(none_rset, accept),)
     
     default_rql = None
     
@@ -400,7 +399,7 @@
     """
     __registry__ = 'templates'
     __registerer__ = priority_registerer
-    __selectors__ = (in_group_selector,)
+    __selectors__ = (match_user_group,)
 
     require_groups = ()