コード例 #1
0
 def _process(self):
     sess = self.session if not self.session_block else None
     rescheduler = Rescheduler(self.event, RescheduleMode[request.json['mode']], self.day,
                               session=sess, session_block=self.session_block, fit_blocks=request.json['fit_blocks'],
                               gap=timedelta(minutes=request.json['gap']))
     with track_time_changes(auto_extend='end', user=session.user) as changes:
         rescheduler.run()
     notifications = get_time_changes_notifications(changes, tzinfo=self.event.tzinfo)
     for notification in notifications:
         flash(notification, 'highlight')
     return jsonify_data(flash=False)
コード例 #2
0
ファイル: legacy.py プロジェクト: belokop/indico_bare
 def _process(self):
     sess = self.session if not self.session_block else None
     rescheduler = Rescheduler(self.event_new, RescheduleMode[request.json['mode']], self.day,
                               session=sess, session_block=self.session_block, fit_blocks=request.json['fit_blocks'],
                               gap=timedelta(minutes=request.json['gap']))
     with track_time_changes(auto_extend='end', user=session.user) as changes:
         rescheduler.run()
     notifications = get_time_changes_notifications(changes, tzinfo=self.event_new.tzinfo)
     for notification in notifications:
         flash(notification, 'highlight')
     return jsonify_data(flash=False)