예제 #1
0
 def _process(self):
     form = SessionTypeForm(event=self.event)
     if form.validate_on_submit():
         session_type = SessionType()
         form.populate_obj(session_type)
         self.event.session_types.append(session_type)
         db.session.flush()
         self.event.log(EventLogRealm.management, EventLogKind.positive, 'Sessions',
                        'Added type: {}'.format(session_type.name), session.user)
         types = [{'id': t.id, 'title': t.name} for t in self.event.session_types]
         return jsonify_data(types=types, new_type_id=session_type.id,
                             html_row=render_session_type_row(session_type))
     return jsonify_form(form)
예제 #2
0
파일: sessions.py 프로젝트: weLoser/indico
 def _process_args(self):
     RHManageSessionsBase._process_args(self)
     self.session_type = SessionType.get_one(
         request.view_args['session_type_id'])
예제 #3
0
파일: sessions.py 프로젝트: indico/indico
 def _process_args(self):
     RHManageSessionsBase._process_args(self)
     self.session_type = SessionType.get_one(request.view_args['session_type_id'])