< 폴더경로 >
< result.html >
1
2
3
4
5
6
7
8
9
10
|
<!doctype html>
<html>
<body>
{% if marks>50 %}
<h1> Your result is pass!</h1>
{% else %}
<h1>Your result is fail</h1>
{% endif %}
</body>
</html>
|
< template_test.py >
1
2
3
4
5
6
7
8
9
|
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/input/<int:score>')
def input_name(score):
return render_template('result.html', marks = score)
if __name__ == '__main__':
app.run(host='0.0.0.0', port='80', debug = True)
|
'PRACTICE > Basic' 카테고리의 다른 글
[Flask] SQLAlchemy 사용하여 학생테이블 출력하기 (0) | 2020.11.25 |
---|---|
[Flask] 로그인 페이지, 로그인 성공 시 flash 메시지 출력하기 (0) | 2020.11.25 |
[Python] 삼각형 넓이 구하기 (0) | 2020.11.23 |
[Python, OpenCV] 두 개의 이미지 파일 합성하기 (0) | 2020.11.11 |
[Python, OpenCV] boxFilter 와 bilateralFilter 를 5초 간격으로 번갈아 실행시키기 (0) | 2020.11.11 |
댓글