-
+ {% for year in year_post_group %}
+ {# 遍历按年份分组的结果 #}
+
- {{ year.grouper }} {% trans 'year' %} {# 显示年份 #}
+ {% regroup year.list by pub_time.month as month_post_group %}
+
-
+ {% for month in month_post_group %} {# 遍历按月份分组的结果 #}
+
- {{ month.grouper }} {% trans 'month' %}
+ {# 显示月份,以及“月”的国际化翻译 #}
+
-
+ {% for article in month.list %}
+
- {{ article.title }} + {# 显示文章标题,并设置链接到文章详情页 #} + {% endfor %} +
+ {% endfor %}
+
+ {% endfor %}
+ - {{ month.grouper }} {% trans 'month' %}
+ {# 显示月份,以及“月”的国际化翻译 #}
+
{# 主要内容区域,role属性表明其主要内容的角色 #}
+
+ {# 文章归档部分的头部容器 #}
+
+
+
+
+ {% trans 'article archive' %}
{# 显示“文章归档”的标题 #} + {# 文章归档的内容区域 #}
+
+ {% regroup article_list by pub_time.year as year_post_group %} {# 将文章列表按发布时间的年份分组,结果保存到year_post_group #}
+
+
您还没有登录,请您登录后发表评论。 +
+{# 登录链接,next参数携带当前页面的完整URL,确保用户登录后能跳转回当前文章页 #} + {% load oauth_tags %} + {% load_oauth_applications request %} + +