1seok2

add flask post

No preview for this file type
node_modules
.env
.vscode
chromedriver
key.py
\ No newline at end of file
key.py
......
import os
from config.firebase import db
from flask import Flask, render_template
from flask import Flask, render_template, request
# data = {
# "age": 24,
......@@ -23,6 +23,12 @@ def home():
return render_template('index.html')
@app.route("/check", methods=["POST"])
def check():
value = request.form['insta_id']
return value
if __name__ == "__main__":
print("-" * 60)
print(" server is start")
......
<!DOCTYPE html>
<html>
<head>
<title>check insta</title>
</head>
<body>
<h1>메인 화면</h1>
<form action="/check" method="POST">
<input id="insta_id" placeholder="id" type="text" name="insta_id"/>
<button>제출</button>
</form>
</body>
</html>
\ No newline at end of file
......