<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>后台-添加分类数据</title>
</head>
<body>
{% for m in get_flashed_messages() %}
{{ m }}
{% endfor %}
<br>
<form method="post">
分类名称: <input type="text" name="name" placeholder="请输入分类名称">
<br>
<button type="submit">添加</button>
</form>
<br>
<table border="1">
<tr>
<td>序号</td>
<td>名称</td>
</tr>
{% for c in data.cate_list %}
<tr>
<td>{{ loop.index }}</td>
<td>{{ c.name }}</td>
</tr>
{% endfor %}
</table>
<ul>
{% for c in data.cate_list %}
<li>{{ loop.index }} - {{ c.name }}</li>
{% endfor %}
</ul>
</body>
</html>
转载于:https://www.cnblogs.com/Jacky-WYQ/p/10915664.html