equal
deleted
inserted
replaced
13 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
13 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
14 # details. |
14 # details. |
15 # |
15 # |
16 # You should have received a copy of the GNU Lesser General Public License along |
16 # You should have received a copy of the GNU Lesser General Public License along |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
18 """some hooks and views to handle supervising of any data changes |
18 """some hooks and views to handle supervising of any data changes""" |
19 |
19 |
20 |
|
21 """ |
|
22 __docformat__ = "restructuredtext en" |
20 __docformat__ = "restructuredtext en" |
23 |
21 |
24 from cubicweb import UnknownEid |
22 from cubicweb import UnknownEid |
25 from cubicweb.selectors import none_rset |
23 from cubicweb.selectors import none_rset |
26 from cubicweb.schema import display_name |
24 from cubicweb.schema import display_name |
183 content = view.render(changes=session.transaction_data.get('pendingchanges')) |
181 content = view.render(changes=session.transaction_data.get('pendingchanges')) |
184 recipients = view.recipients() |
182 recipients = view.recipients() |
185 msg = format_mail(uinfo, recipients, content, view.subject(), config=config) |
183 msg = format_mail(uinfo, recipients, content, view.subject(), config=config) |
186 self.to_send = [(msg, recipients)] |
184 self.to_send = [(msg, recipients)] |
187 |
185 |
188 def commit_event(self): |
186 def postcommit_event(self): |
189 self._prepare_email() |
187 self._prepare_email() |
190 SendMailOp.commit_event(self) |
188 SendMailOp.postcommit_event(self) |