Пример #1
0
 def _process(self):
     section = RegistrationFormSection(registration_form=self.regform)
     section.title = request.json['title']
     section.description = request.json.get('description')
     section.is_manager_only = request.json['is_manager_only']
     db.session.add(section)
     db.session.flush()
     logger.info('Section %s created by %s', section, session.user)
     return jsonify_data(**section.view_data)
Пример #2
0
 def _process(self):
     section = RegistrationFormSection(registration_form=self.regform)
     section.title = request.json['title']
     section.description = request.json.get('description')
     section.is_manager_only = request.json['is_manager_only']
     db.session.add(section)
     db.session.flush()
     logger.info('Section %s created by %s', section, session.user)
     return jsonify_data(**section.view_data)