django运行后无法显示HTML文件内div内模块的内容
如题
我在HTML文件中使用div模块,但是这个模块里的内容runserver后无法显示
代码如下:
<body>
<div class="header">
<h1 align="center">我的博客</h1>
</div>
<h3 style="margin-bottom: -50px;font-size: x-large;">博客列表
</h3>
<hr/>
{% for blog in blogs %}
<div align="center" class="blog">
<div class="title">
<a href="{% url 'blog_get_detail' blog.id %}"><h2 align="left">{{ blog.title }}</h2></a>
</div>
<div class="info" align="left">
<span class="category" style="color: #ff9900;">{{ blog.category.name }}</span>
<span class="author" style="color: #4a86e8;">{{ blog.author }}</span>
<span class="pub" style="color: #6aa84e">{{ blog.pub }}</span>
</div>
<div class="summary">
{{ blog.content | truncatechars:100 }}
</div>
</div>
{% endfor %}
</body>