From cdecc8f3cdb045093e69bd7b402417e8d16a66fa Mon Sep 17 00:00:00 2001 From: pa2g3nmk9 <3474779149@qq.com> Date: Sun, 19 Oct 2025 16:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/DjangoBlog-master/tem?= =?UTF-8?q?plates/comments/tags/comment=5Flist.html'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/comments/tags/comment_list.html | 53 +++++++++++++------ 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/src/DjangoBlog-master/templates/comments/tags/comment_list.html b/src/DjangoBlog-master/templates/comments/tags/comment_list.html index 4092161..155e21f 100644 --- a/src/DjangoBlog-master/templates/comments/tags/comment_list.html +++ b/src/DjangoBlog-master/templates/comments/tags/comment_list.html @@ -1,45 +1,64 @@ - +
- {% load blog_tags %} - {% load comments_tags %} - {% load cache %} + {% load blog_tags %} {# 加载自定义博客标签 #} + {% load comments_tags %} {# 加载评论相关标签 #} + {% load cache %} {# 加载缓存标签 #} + {# 评论标签页导航 #} - {% if article_comments %} + + {# 评论列表容器 #} + {% if article_comments %} {# 如果存在评论 #}
+ + {# 评论列表 #}
    - {# {% query article_comments parent_comment=None as parent_comments %}#} + {# 注释掉的代码:{% query article_comments parent_comment=None as parent_comments %} #} + + {# 遍历父级评论(顶级评论,没有父评论) #} {% for comment_item in p_comments %} - + {# 初始化深度为0,开始递归渲染评论树 #} {% with 0 as depth %} {% include "comments/tags/comment_item_tree.html" %} {% endwith %} {% endfor %} -
+ + {# 评论分页导航 #} +
{% endif %}
- - \ No newline at end of file +
\ No newline at end of file