Ejemplo n.º 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)
Ejemplo n.º 2
0
 def _process_args(self):
     RHManageSessionsBase._process_args(self)
     self.session_type = SessionType.get_one(
         request.view_args['session_type_id'])
Ejemplo n.º 3
0
 def _process_args(self):
     RHManageSessionsBase._process_args(self)
     self.session_type = SessionType.get_one(request.view_args['session_type_id'])