equal
deleted
inserted
replaced
18 """some hooks to handle notification on entity's changes""" |
18 """some hooks to handle notification on entity's changes""" |
19 |
19 |
20 |
20 |
21 |
21 |
22 from logilab.common.textutils import normalize_text |
22 from logilab.common.textutils import normalize_text |
23 from logilab.common.deprecation import deprecated |
|
24 |
23 |
25 from cubicweb import RegistryNotFound |
24 from cubicweb import RegistryNotFound |
26 from cubicweb.predicates import is_instance |
25 from cubicweb.predicates import is_instance |
27 from cubicweb.server import hook |
26 from cubicweb.server import hook |
28 from cubicweb.sobjects.supervising import SupervisionMailOp |
27 from cubicweb.sobjects.supervising import SupervisionMailOp |
29 |
|
30 |
|
31 @deprecated('[3.17] use notify_on_commit instead') |
|
32 def RenderAndSendNotificationView(cnx, view, viewargs=None): |
|
33 notify_on_commit(cnx, view, viewargs) |
|
34 |
28 |
35 |
29 |
36 def notify_on_commit(cnx, view, viewargs=None): |
30 def notify_on_commit(cnx, view, viewargs=None): |
37 """register a notification view (see |
31 """register a notification view (see |
38 :class:`~cubicweb.sobjects.notification.NotificationView`) to be sent at |
32 :class:`~cubicweb.sobjects.notification.NotificationView`) to be sent at |