コード例 #1
0
ファイル: controllers.py プロジェクト: DavidAndreev/indico
 def _process(self):
     form = AnnouncementForm(obj=FormDefaults(**announcement_settings.get_all()))
     if form.validate_on_submit():
         announcement_settings.set_multi(form.data)
         flash(_('Settings have been saved'), 'success')
         return redirect(url_for('announcement.manage'))
     return WPAnnouncement.render_template('settings.html', form=form)
コード例 #2
0
ファイル: controllers.py プロジェクト: fph/indico
 def _process(self):
     form = AnnouncementForm(obj=FormDefaults(**announcement_settings.get_all()))
     if form.validate_on_submit():
         announcement_settings.set_multi(form.data)
         flash(_('Settings have been saved'), 'success')
         return redirect(url_for('announcement.manage'))
     return WPAnnouncement.render_template('settings.html', form=form)