提交评论
<!-- 提交评论 -->
<h3>提交评论</h3>
<div class="commet-put">
<!-- <p>请先登录后进行评论</p> -->
{% if request.user.is_authenticated%}
<!-- 将post改为json传输数据的形式 -->
<form id="comment_sent" action="{% url 'article:detail' essay.id %}" method="post">
{% csrf_token %}
<div>
<label> 评论内容</label>
<div>
<!-- {
{ formtext.context }}
{
{ formtext.context.error }} -->
{
{ formtext.media }}
{
{ formtext.as_p }}
</div>
<span class="text_danger pull-left" id="comment_error"></span>
<button type="button" id="btn_comment" class="btn btn-primary pull-right">提交</button>
</div>
</form>
{% else %}
请先
<a href="{% url 'users:login' %}"><button type="button" class="btn btn-primary">登录</button></a>
后进行评论
{% endif %}
</div>
评论列表
<h3>评论列表</h3>
<