❤
jangjunha<jangjunha113@gmail.com>
<html>
<h1> </h1>
<article>
<p> </p>
</article>
</html>
render_template('hello.html')
/application.py
/templates
/hello.html
/profile.html
/static
/logo.png
/app.js
/app.css
/application.py
/templates
/hello.html
/profile.html
/static
/logo.png
/app.js
/app.css
/ index.html
/users user_list.html
/users/HeeGyu profile.html
profile.html
<html>
<h1> </h1>
<article>
<p> </p>
</article>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HiHi</title>
</head>
<body>
<h1> {{ countdown }} </h1>
</body>
</html>
render_template('index.html', countdown=365)
<h3> </h3>
<ul>
{% for comment in comments %}
<li>
<h4>{{ comment.writer }}:</h4>
<p>{{ comment.content }}</p>
</li>
{% endfor %}
</ul>
comments = [
{ 'writer': ' ', 'content': ' ?' },
{ 'writer': ' ', 'content': '♚♚히어로즈 …' }
]
return render_template('index.html', comments=comments)
(...)
<body>
<h1> {{ countdown }}</h1>
{% block content %}
{% endblock %}
</body>
</html>
{% extends "layout.html" %}
{% block content %}
<h3> </h3>
<ul>
{% for comment in comments %}
<li>
<h4>{{ comment.writer }}:</h4>
<p>{{ comment.content }}</p>
</li>
{% endfor %}
</ul>
{% endblock %}
{% extends "layout.html" %}
{% block content %}
<form action="/" method="post">
<input type="text" name="writer" placeholder=" "><br>
<textarea name="content" placeholder=" "></textarea><br>
<input type="submit" value=" "><br>
</form>
{% endblock %}
/about
<form action="/new_comment" method="post">
<input type="text" name="writer" placeholder=" ">
<textarea name="content" placeholder=" "></textarea>
<input type="submit" value=" ">
</form>
from flask import Flask, request
@app.route('/new_comment', methods=['POST'])
def post_comment():
print(request.form['writer'])
(...)
request.form
https://search.naver.com/search.naver?ie=UTF-8&query=2017+
ie=UTF-8
query=2017+
from flask import Flask, request
@app.route('/list')
def comment_list():
print(request.args.get('page', 1))
(...)
request.args
• request.form
• request.args
• request.values
• request.cookies
• request.headers
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시
Flask 소수전공 강의자료 - 2차시

Flask 소수전공 강의자료 - 2차시