diff --git a/src/DjangoBlog-master/templates/comments/tags/post_comment.html b/src/DjangoBlog-master/templates/comments/tags/post_comment.html index 3ae5a27..da584a0 100644 --- a/src/DjangoBlog-master/templates/comments/tags/post_comment.html +++ b/src/DjangoBlog-master/templates/comments/tags/post_comment.html @@ -1,33 +1,32 @@ -
+``` +
{# 评论区域容器 #} -
-

发表评论 +
{# 评论回复表单容器 #} +

发表评论 {# 评论表单标题 #} + style="display:none;">取消回复 {# 隐藏的取消回复链接 #}

-
{% csrf_token %} -

- {{ form.body.label_tag }} + {% csrf_token %} {# CSRF令牌保护 #} +

{# 评论内容字段 #} + {{ form.body.label_tag }} {# 评论内容标签 #} - {{ form.body }} - {{ form.body.errors }} + {{ form.body }} {# 评论内容输入框 #} + {{ form.body.errors }} {# 评论内容错误提示 #}

- {{ form.parent_comment_id }} -
- {% if COMMENT_NEED_REVIEW %} - 支持markdown,评论经审核后才会显示。 - {% else %} - 支持markdown。 + {{ form.parent_comment_id }} {# 隐藏的父评论ID字段 #} +
{# 表单提交区域 #} + {% if COMMENT_NEED_REVIEW %} {# 如果评论需要审核 #} + 支持markdown,评论经审核后才会显示。 {# 审核提示 #} + {% else %} {# 如果评论不需要审核 #} + 支持markdown。 {# 普通提示 #} {% endif %} - -