From ce3c9cab1de2551500caa45540f072eceadc8f90 Mon Sep 17 00:00:00 2001 From: pa2g3nmk9 <3474779149@qq.com> Date: Thu, 6 Nov 2025 23:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/DjangoBlog-master/tem?= =?UTF-8?q?plates/comments/tags/post=5Fcomment.html'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/comments/tags/post_comment.html | 45 +++++++++---------- 1 file changed, 22 insertions(+), 23 deletions(-) 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 %} - -