コード例 #1
0
 def _process(self):
     settings = track_settings.get_all(self.event)
     form = ProgramForm(obj=FormDefaults(**settings))
     if form.validate_on_submit():
         update_program(self.event, form.data)
         flash(_("The program has been updated."))
         return jsonify_data()
     elif not form.is_submitted():
         handle_legacy_description(form.program, settings, get_render_mode=itemgetter('program_render_mode'),
                                   get_value=itemgetter('program'))
     return jsonify_form(form)
コード例 #2
0
ファイル: controllers.py プロジェクト: bkolobara/indico
 def _process(self):
     settings = track_settings.get_all(self.event)
     form = ProgramForm(obj=FormDefaults(**settings))
     if form.validate_on_submit():
         update_program(self.event, form.data)
         flash(_("The program has been updated."))
         return jsonify_data()
     elif not form.is_submitted():
         handle_legacy_description(form.program, settings, get_render_mode=itemgetter('program_render_mode'),
                                   get_value=itemgetter('program'))
     return jsonify_form(form)