Django threadcomments - 我如何回复评论?

Sil*_*ght 3 django threaded-comments

我正在尝试将threadedcommetns集成到我的Django应用程序中,并且无法理解它是如何工作的.以下是我的模板外观(基于教程中的示例):

<h3>Comments on This Post:</h3>
{% get_threaded_comment_tree for post as tree %}
{% for comment in tree %}
    <div style="margin-left: {{ comment.depth }}em;" class="comment">
        {% link_to_profile comment.user %}
        {% auto_transform_markup comment %}
    </div>
{% endfor %}
<p>Reply to Original:</p>
<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>
Run Code Online (Sandbox Code Playgroud)

那么,如果这些是线程评论,我如何回复某人已经留下的评论?形式在哪里?我只是设法得到Reply to Original表单,但有了这个,评论根本没有线程.

我非常感谢你的帮助.

PS实际上,我不太高兴这个应用程序如何与django 1.3一起工作,所以建议一个替代方案也是一个很好的答案.

Sil*_*ght 6

好像django threadedcommetns在这里不是很受欢迎:)

我找到了一个很棒的图书馆:django-mptt

这是我的教程,它描述了如何使用django-mptt在django中实现线程注释:http://codeblogging.net/blogs/1/3/