web/views/emailaddress.py
branchtls-sprint
changeset 688 cddfbdee0eb3
parent 0 b97547f5f1fa
child 728 a95b284150d1
--- a/web/views/emailaddress.py	Tue Feb 17 20:34:20 2009 +0100
+++ b/web/views/emailaddress.py	Tue Feb 17 20:39:09 2009 +0100
@@ -8,11 +8,12 @@
 
 from logilab.mtconverter import html_escape
 
+from cubicweb.selectors import implements
 from cubicweb.common import Unauthorized
 from cubicweb.web.views import baseviews
 
 class EmailAddressPrimaryView(baseviews.PrimaryView):
-    accepts = ('EmailAddress',)
+    __selectors__ = implements('EmailAddress')
     
     def cell_call(self, row, col, skipeids=None):
         self.skipeids = skipeids
@@ -59,7 +60,7 @@
 
 
 class EmailAddressShortPrimaryView(EmailAddressPrimaryView):
-    accepts = ('EmailAddress',)
+    __selectors__ = implements('EmailAddress')
     id = 'shortprimary'
     title = None # hidden view
     def render_entity_attributes(self, entity, siderelations):
@@ -69,7 +70,7 @@
 
     
 class EmailAddressOneLineView(baseviews.OneLineView):
-    accepts = ('EmailAddress',)
+    __selectors__ = implements('EmailAddress')
     
     def cell_call(self, row, col, **kwargs):
         entity = self.entity(row, col)
@@ -89,7 +90,7 @@
     'mailto:'"""
 
     id = 'mailto'
-    accepts = ('EmailAddress',)
+    __selectors__ = implements('EmailAddress')
     
     def cell_call(self, row, col, **kwargs):
         entity = self.entity(row, col)
@@ -113,7 +114,7 @@
 
     
 class EmailAddressTextView(baseviews.TextView):
-    accepts = ('EmailAddress',)
+    __selectors__ = implements('EmailAddress')
     
     def cell_call(self, row, col, **kwargs):
         self.w(self.entity(row, col).display_address())