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)
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)
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)