コード例 #1
0
 def _process(self):
     settings = abstracts_settings.get_all(self.event)
     form = AbstractSubmissionSettingsForm(event=self.event, obj=FormDefaults(**settings))
     if form.validate_on_submit():
         abstracts_settings.set_multi(self.event, form.data)
         flash(_('Abstract submission settings have been saved'), 'success')
         return jsonify_data()
     elif not form.is_submitted():
         handle_legacy_description(form.announcement, settings,
                                   get_render_mode=itemgetter('announcement_render_mode'),
                                   get_value=itemgetter('announcement'))
     return jsonify_form(form)
コード例 #2
0
ファイル: management.py プロジェクト: indico/indico
 def _process(self):
     settings = abstracts_settings.get_all(self.event)
     form = AbstractSubmissionSettingsForm(event=self.event, obj=FormDefaults(**settings))
     if form.validate_on_submit():
         abstracts_settings.set_multi(self.event, form.data)
         flash(_('Abstract submission settings have been saved'), 'success')
         return jsonify_data()
     elif not form.is_submitted():
         handle_legacy_description(form.announcement, settings,
                                   get_render_mode=itemgetter('announcement_render_mode'),
                                   get_value=itemgetter('announcement'))
     return jsonify_form(form)