{% extends 'base.html' %} {# 将当前页面继承至base.html模板 #} {% block content %}
{% for article, nickname in result %}
作者:{{nickname}}   类别:{{article_type[article.category | string]}}    日期:{{article.createtime}}   阅读:{{article.readcount}} 次   消耗积分:{{article.credit}} 分
{{article.content | striptags | truncate(80)}}
{% endfor %}
{% if page == 1 %} 上一页   {% else %} 上一页   {% endif %} {% for i in range(total) %} {{i+1}}   {% endfor %} {% if page == total %} 下一页 {% else %} 下一页 {% endif %}
{# 按需引入side.html,首页需要 #} {% include 'side.html' %} {% endblock %}