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