flask comment 朋友圈页面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>朋友圈</title>
<script type="text/javascript" src="../static/jquery-1.12.4.min.js"></script>
</head>
<body>
<form action="" method="post">
<input type="hidden" value="{{ data.friends_list.id }}" name="id">
{{ data.friends_list.title }}
{{ data.friends_list.content | safe }}
{% for mes in get_flashed_messages() %}
<script>
alert('{{mes}}')
</script>
{% endfor %}
<form action="" method="post" id="a">
评论内容:<textarea cols="30" rows="4" name="content"></textarea>
<button type="submit">评论</button>
</form>
{% for i in data.comment %}
评论{{ loop.index }}:{{ i.content }}<br>
{% endfor %}
</form>
</body>
</html>

更多精彩