Exemplo n.º 1
0
def sungjukAct():
    if request.method == 'GET':
        return sungjuk.getSungjuk()

    elif request.method == "POST":
        name = request.form['name1']
        kor = request.form['kor1']
        mat = request.form['mat1']
        eng = request.form['eng1']
        sungdata = {'name1': name, 'kor1': kor, 'mat1': mat, 'eng1': eng}
        return sungjuk.setSungjuk(sungdata)

    elif request.method == "PUT":
        id5 = request.form['id5']
        name = request.form['name1']
        kor = request.form['kor1']
        mat = request.form['mat1']
        eng = request.form['eng1']
        sungData = {
            'id5': id5,
            'name1': name,
            'kor1': kor,
            'mat1': mat,
            'eng1': eng
        }
        print(sungData)
        return sungjuk.putSungjuk(sungData)

    elif request.method == 'DELETE':
        id = request.form['id']
        print(id)
        return sungjuk.delSungjuk(id)
Exemplo n.º 2
0
def sungjukAct():
    if request.method == 'GET':  #데이터 수신
        return sungjuk.getSungjuk()
    elif request.method == 'POST':  #서버측 데이터 전달
        name = request.form['name1']
        kor = request.form['kor1']
        mat = request.form['mat1']
        eng = request.form['eng1']
        school = request.form['school1']
        sungData = {
            'name': name,
            'kor': kor,
            'mat': mat,
            'eng': eng,
            'school': school
        }
        return sungjuk.setSungjuk(sungData)
    elif request.method == 'DELETE':  #삭제
        name = request.form['id']
        return sungjuk.delSungjuk(name)
    elif request.method == 'PUT':  #수정시 호출
        sungdata = request.form
        print()
        print()
        print()
        print()
        print()
        print()
        print()
        print()
        print(sungdata)
        return sungjuk.putSungjuk(sungdata)
Exemplo n.º 3
0
def sungjukAct():
    if request.method == 'GET':
        return sungjuk.getSungjuk()
    elif request.method == 'POST':
        name = request.form['name1']
        kor  = request.form['kor1']
        mat  = request.form['mat1']
        eng  = request.form['eng1']
        sungdata = {'name' : name, 'kor' : kor, 'mat' : mat, 'eng' : eng}
        return  sungjuk.setSungjuk(sungdata)

    elif request.method == 'DELETE':
        name = request.form['id']
        return  sungjuk.delSungjuk(name)

    elif request.method == 'PUT':
        sungData = request.form

        return sungjuk.putSungjuk(sungData)
Exemplo n.º 4
0
def sungjuk_call():
    result = sungjuk.getSungjuk()
    result2 = sungjuk.sumSungjuk()
    return render_template("sungjuk.html",
                           object_list=result,
                           object_list2=result2)
Exemplo n.º 5
0
def sungjuk_call():
    result = sungjuk.getSungjuk()
    # print(result)
    return render_template("sungjuk.html", object_list=result)
Exemplo n.º 6
0
def sungjuk1():
    result = sungjuk.getSungjuk()
    return render_template("sungjuk.html", object_list=result)