def subject_create(): subject_data = request.json['data'] create = SubjectConf.create_subject(subject_data) return create
def subject_page_update(subject_id): data = request.json['data'] resp = SubjectConf.update_obj(models.Subject, subject_id, db, data) return resp
def subjects(): return SubjectConf.get_objects_dict_list_or_404(models.Subject, **request.args)
def subject_page(subject_id): return SubjectConf.get_obj_dict_or_404(models.Subject, subject_id)
def subject_delete(subject_id): subject = SubjectConf.get_obj(models.Subject, subject_id) resp = SubjectConf.delete_object(subject, db) return resp
def subject_delete(subject_id): subject = SubjectConf.get_obj(Subject, subject_id) return SubjectConf.delete_object(subject, db)
def subjects(): return SubjectConf.get_objects_dict_list_or_404(Subject)