예제 #1
0
def subject_create():
    subject_data = request.json['data']
    create = SubjectConf.create_subject(subject_data)
    return create
예제 #2
0
def subject_page_update(subject_id):
    data = request.json['data']
    resp = SubjectConf.update_obj(models.Subject, subject_id, db, data)
    return resp
예제 #3
0
def subjects():
    return SubjectConf.get_objects_dict_list_or_404(models.Subject,
                                                    **request.args)
예제 #4
0
def subject_page(subject_id):
    return SubjectConf.get_obj_dict_or_404(models.Subject, subject_id)
예제 #5
0
def subject_delete(subject_id):
    subject = SubjectConf.get_obj(models.Subject, subject_id)
    resp = SubjectConf.delete_object(subject, db)
    return resp
예제 #6
0
def subject_delete(subject_id):
    subject = SubjectConf.get_obj(Subject, subject_id)
    return SubjectConf.delete_object(subject, db)
예제 #7
0
def subjects():
    return SubjectConf.get_objects_dict_list_or_404(Subject)