Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your reply to original looks good.</p> <pre><code>&lt;form method="POST" action="{% get_comment_url post %}"&gt; {% csrf_token %} &lt;ul&gt; {% get_threaded_comment_form as form %} {{ form.as_ul }} &lt;li&gt;&lt;input type="submit" value="Submit Comment" /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/form&gt; </code></pre> <p>Say you want to keep reply form for every comment and keep it as threaded.</p> <pre><code>&lt;div class="bulk"&gt; {% get_threaded_comment_tree for post as tree %} {% for comment in tree %} &lt;div style="margin-left:{{comment.depth}}em;"&gt; {{comment}} Reply to this comment &lt;form action="{% get_comment_url post comment %}" method="POST"&gt; &lt;ul&gt; {% get_threaded_comment_form as form %} {{ form.as_ul }} &lt;li&gt;&lt;input type="submit" value="Submit Reply" /&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/form&gt; &lt;/div&gt; {% endfor %} &lt;/div&gt; </code></pre> <p>Here we render the comment tree and keep a form beneath each comment which allows reply for that particular comment. The post url for this form is set as <code>{% get_comment_url post comment %}</code>. This is the only change we made apart from all that you described in the question. All this template tag says is that do a post but also set a parent for the reply. And the parent for the reply is the <code>{{comment}}</code> for which you are replying.</p> <p>So, if you want "Reply for original", you use <code>{% get_comment_url post %}</code>.</p> <p>And if you want to reply for a particular comment, you use <code>{% get_comment_url post comment %}</code>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload