使用flask完成一个增删改查的demo

运行截图如下,功能就是简单的增删改查,demo只是为了熟悉flask的交互,熟练自己的使用,不再详细介绍,但由于不熟悉flask,完成过程中遇到了很多的坑...待整理📂
截图
使用flask表单,如此来展示从后台传递的数据还是很方便的

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <table class="table table-hover table-striped">
        <thead>
        <tr>
            {% for key, value in result.items() %}
               <th> {{ key }} </th>
            {% endfor %}
        </tr>
        </thead>
        <tbody>
        <tr>
            {% for key, value in result.items() %}
               <td> {{ value }} </td>
            {% endfor %}
        </tr>
        </tbody>
    </table>
</body>
</html>
posted @ 2021-01-21 23:43  xppp11  阅读(173)  评论(0编辑  收藏  举报