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