目标效果:修改blog\_detail.html的提交评论和评论列表样式及相关区域。由于表单提交需要id和content\_type,所以我们在html中的表单中也需要写这些提交评论{%ifuser.s_authenticated%}{%csrf_token%}"comment_text">{{user.username}},欢迎评论~{#使用input不能输入多行,所以替换用textarea写多行内容,在bootstrap中使用form-control优化编辑区和提交功能的性能#}inputtype="hidden"name="object_id"value="{{blog.pk}}">{%Else%}不符合逻辑,登录后可以评论{%CSRF_TOKEN%}用户名:/span>Password:{%Endif%}