.
<form method="POST" action="{% get_comment_url post %}">
{% csrf_token %}
<ul>
{% get_threaded_comment_form as form %}
{{ form.as_ul }}
<li><input type="submit" value="Submit Comment" /></li>
</ul>
</form>
, threaded.
<div class="bulk">
{% get_threaded_comment_tree for post as tree %}
{% for comment in tree %}
<div style="margin-left:{{comment.depth}}em;">
{{comment}}
Reply to this comment
<form action="{% get_comment_url post comment %}" method="POST">
<ul>
{% get_threaded_comment_form as form %}
{{ form.as_ul }}
<li><input type="submit" value="Submit Reply" /></li>
</ul>
</form>
</div>
{% endfor %}
</div>
, . URL {% get_comment_url post comment %}. , , . , , . {{comment}}, .
So, if you want "Reply for original," you use {% get_comment_url post %}.
And if you want to answer for a specific comment, you use {% get_comment_url post comment %}.
source
share