【发布时间】:2021-12-28 12:25:59
【问题描述】:
我正在使用烧瓶、html 和 css 创建一个简单的网络应用程序。但是,我的表单中的数据没有提交到我的 SQLite 数据库,也没有出现在我的 html 表中。当我查看页面源代码时,我注意到 jinja 代码实际上丢失了。
<table class="table table-striped mt-5">
<thead>
<tr>
<th>Title</th>
<th>Author</th>
<th>Category</th>
<th>Read</th>
<th></th>
</tr>
</thead>
<tbody>
{% for book in booklist %}
<tr>
<td>{{book.title}}</td>
<td>{{book.author}}</td>
<td>{{book.category}}</td>
<td>{{book.read}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</body>
</html>
【问题讨论】: