flask에서 html 페이지 띄우는 방법
from project_name import app
from flask import render_template
@app.route('/')
def index():
get_id = 1
get_password = 2
return render_template('index.html', id=get_id, password=get_password)
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True, port = 18989)
'Python-Framework > Python-Framework__Flask' 카테고리의 다른 글
Flask api query string (0) | 2019.09.25 |
---|---|
flask restful crud (0) | 2019.07.25 |
flask_restful (0) | 2019.07.24 |
Flask pymysql + RestApi (0) | 2019.04.26 |
flask centos 에서 실행하기 (0) | 2019.03.20 |