Beispiel #1
0
 def _process_POST(self):
     delete_event(self.event_new)
     flash(
         _('Event "{}" successfully deleted.').format(self.event_new.title),
         'success')
     redirect_url = url_for('categories.manage_content',
                            self.event_new.category)
     return jsonify_data(url=redirect_url, flash=False)
Beispiel #2
0
 def _process(self):
     is_submitted = 'confirmed' in request.form
     if not is_submitted:
         return jsonify_template('events/management/delete_events.html', events=self.events)
     for ev in self.events[:]:
         delete_event(ev)
     flash(ngettext('You have deleted one event', 'You have deleted {} events', len(self.events))
           .format(len(self.events)), 'success')
     return jsonify_data(flash=False, redirect=url_for('.manage_content', self.category))
Beispiel #3
0
 def _process(self):
     is_submitted = 'confirmed' in request.form
     if not is_submitted:
         return jsonify_template('events/management/delete_events.html', events=self.events)
     for ev in self.events[:]:
         delete_event(ev)
     flash(ngettext('You have deleted one event', 'You have deleted {} events', len(self.events))
           .format(len(self.events)), 'success')
     return jsonify_data(flash=False, redirect=url_for('.manage_content', self.category))
Beispiel #4
0
 def _process_POST(self):
     delete_event(self.event_new)
     flash(_('Event "{}" successfully deleted.').format(self.event_new.title), 'success')
     redirect_url = url_for('categories.manage_content', self.event_new.category)
     return jsonify_data(url=redirect_url, flash=False)