728x90
[flask app 통신] app.py를 만들어보자에서 사용하였던 render_template('post.html')의 post.html을 만들어보겠습니다.
post.html은 이름을 작성할 수 있는 간단한 폼으로 구성되어 있습니다.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="/post" method="post">
<p>이름 : <input type="text" value=""></p>
<input type="submit" value="제출하기">
</form>
</body>
</html>
이름을 입력할 수 있게 input type='text'로 지정해주고, /post 경로로 정보를 보낼 수 있는 제출 버튼 input type='submit'도 만들어준다.
728x90
'Project > flask app 통신' 카테고리의 다른 글
[flask app 통신] Android Studio를 통한 https 요청 (1) | 2021.03.18 |
---|---|
[flask app 통신] app.py를 만들어보자 (0) | 2021.03.11 |
[flask app 통신] 프로젝트 설명 (2) | 2021.03.10 |