update notification view, cwetype
authorsylvain.thenault@logilab.fr
Thu, 30 Apr 2009 16:53:48 +0200
changeset 18 2c1498561959
parent 17 ca5839227688
child 19 45097dc3ff89
update notification view, cwetype
hooks.py
schema.py
--- a/hooks.py	Thu Apr 30 09:37:33 2009 +0200
+++ b/hooks.py	Thu Apr 30 16:53:48 2009 +0200
@@ -10,7 +10,7 @@
 from cubicweb.common import ValidationError
 from cubicweb.server.hooksmanager import Hook
 from cubicweb.server.pool import PreCommitOperation
-from cubicweb.sobjects.notification import NormalizedTextView, NotificationView, StatusChangeMixIn
+from cubicweb.sobjects.notification import ContentAddedView, NotificationView, StatusChangeMixIn
 
 class BeforeKeywordApplicationHook(Hook):
     """
@@ -134,7 +134,7 @@
             self.get_oldname(entity), entity.name)
         
 
-class KeywordAddedView(NormalizedTextView):
+class KeywordAddedView(ContentAddedView):
     """get notified from new keywords"""
     accepts = ('Keyword',)
     content_attr = 'name'
--- a/schema.py	Thu Apr 30 09:37:33 2009 +0200
+++ b/schema.py	Thu Apr 30 16:53:48 2009 +0200
@@ -9,7 +9,7 @@
         }
     name = String(required=True, fulltextindexed=True, unique=True,
                   maxsize=128)
-    classifies = SubjectRelation('EEType',
+    classifies = SubjectRelation('CWEType',
                                  # see relation type docstring
                                  constraints = [RQLConstraint('RDEF to_entity O, RDEF relation_type R, R name "applied_to"')])