跟着麦叔学flask,感谢b站麦叔
This commit is contained in:
20
templates/study/home.html
Executable file
20
templates/study/home.html
Executable 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 %}
|
||||
Reference in New Issue
Block a user