コード例 #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
ファイル: routes.py プロジェクト: besvova490/beetroot_project
def subject_delete(subject_id):
    subject = SubjectConf.get_obj(Subject, subject_id)
    return SubjectConf.delete_object(subject, db)
コード例 #7
0
ファイル: routes.py プロジェクト: besvova490/beetroot_project
def subjects():
    return SubjectConf.get_objects_dict_list_or_404(Subject)