app.py2 4-11 [스파르타피디아] - 뼈대 준비하기 app.py 코드 from flask import Flask, render_template, request, jsonify app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.route("/movie", methods=["POST"]) def movie_post(): sample_receive = request.form['sample_give'] print(sample_receive) return jsonify({'msg':'POST 연결 완료!'}) @app.route("/movie", methods=["GET"]) def movie_get(): return jsonify({'msg':'GE.. 2022. 5. 21. 4-6 [화성땅 공동구매] - 뼈대 준비 app.py 코드 from flask import Flask, render_template, request, jsonify app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.route("/mars", methods=["POST"]) def web_mars_post(): sample_receive = request.form['sample_give'] print(sample_receive) return jsonify({'msg': 'POST 연결 완료!'}) @app.route("/mars", methods=["GET"]) def web_mars_get(): return jsonify({'msg.. 2022. 5. 18. 이전 1 다음