跟着麦叔学flask,感谢b站麦叔

This commit is contained in:
2025-12-21 02:38:00 +08:00
parent 582f8a9234
commit 7e44fe8a2a
20 changed files with 690 additions and 0 deletions

20
templates/study/home.html Executable file
View File

@@ -0,0 +1,20 @@
{# 引入base #}
{% extends 'study/base.html' %}
{# 网站标签 #}
{% block title %}study学习{% endblock %}
{% block content %}
<h1>学习如何搭建一个blog</h1>
<h2>欢迎访问一个学习如何搭建一个blog的页面</h2>
{% for posts in posts %}
<a href="/study/posts/{{ posts['id'] }}">
<!--a href="{{ url_for('study.show_posts_id', posts_id=posts['id']) }}"-->
<h2>{{ posts['title'] }}</h2>
</a>
<span>{{ posts['created_8'] }}</span>
<hr>
<br>
{% endfor %}
{% endblock %}