__select__ migration tls-sprint
authorsylvain.thenault@logilab.fr
Tue, 17 Feb 2009 23:54:30 +0100
branchtls-sprint
changeset 730 9062cdc140a9
parent 729 3cbe805be515
child 731 ac4a94e50b60
__select__ migration
server/hooksmanager.py
sobjects/notification.py
sobjects/supervising.py
--- a/server/hooksmanager.py	Tue Feb 17 23:54:15 2009 +0100
+++ b/server/hooksmanager.py	Tue Feb 17 23:54:30 2009 +0100
@@ -194,7 +194,7 @@
 class Hook(AppObject):
     __metaclass__ = autoid
     __registry__ = 'hooks'
-    __selectors__ = (yes,)
+    __select__ = yes()
     # set this in derivated classes
     events = None
     accepts = None
--- a/sobjects/notification.py	Tue Feb 17 23:54:15 2009 +0100
+++ b/sobjects/notification.py	Tue Feb 17 23:54:30 2009 +0100
@@ -20,7 +20,6 @@
 from cubicweb import RegistryException
 from cubicweb.selectors import implements
 from cubicweb.common.view import EntityView, Component
-from cubicweb.common.registerers import accepts_registerer
 from cubicweb.common.mail import format_mail
 
 from cubicweb.server.pool import PreCommitOperation
@@ -36,8 +35,7 @@
     email addresses specified in the configuration are used
     """
     id = 'recipients_finder'
-    __registerer__ = accepts_registerer
-    __selectors__ = (implements('Any'),)
+    __select__ = implements('Any')
     user_rql = ('Any X,E,A WHERE X is EUser, X in_state S, S name "activated",'
                 'X primary_email E, E address A')
     
@@ -297,7 +295,7 @@
 
 class CardAddedView(NormalizedTextView):
     """get notified from new cards"""
-    __selectors__ = (implements('Card'),)
+    __select__ = implements('Card')
     content_attr = 'synopsis'
     
 
--- a/sobjects/supervising.py	Tue Feb 17 23:54:15 2009 +0100
+++ b/sobjects/supervising.py	Tue Feb 17 23:54:30 2009 +0100
@@ -141,7 +141,7 @@
 class SupervisionEmailView(Component):
     """view implementing the email API for data changes supervision notification
     """
-    __selectors__ = (none_rset,)
+    __select__ = none_rset()
     id = 'supervision_notif'
 
     def recipients(self):