Mercurial > agora-palash
view comments/rawcomment.html @ 195:baf8776dc44d
added code for the integration of comment system into bundles and snippets.
database sync must be run so that necessary tables is created for the comments to work properly.
author | ahsanalishahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Tue, 02 Jul 2013 02:09:21 +0500 |
parents | 50ba20441122 |
children |
line wrap: on
line source
{% load comments %} {% load mptt_tags %} <div id = "comment"> {% if user.is_authenticated %} {% render_comment_form for object %} {% get_comment_list for object as comments %} {% if comments %} {% recursetree comments %} <a name = "c{{ node.id }}"> </a> <!-- {{ node.id }} --> <div class = "comment-node"> <p class = "comment-bar"><a href = "{{ object.get_absolute_url }}#c{{ node.id }}"><strong>{{ node.user }} </strong> ยท {{ node.submit_date|timesince }} ago </a> </p> <p class = "comment"><p class = "comment-body"> {{ node.comment }} </p> {% render_comment_form for object %} </div> {# recursion tree logic #} {% if not node.is_leaf_node %} <div class = "comment-node-child"> {{ children }} </div> {% endif %} {% endrecursetree %} {% endif%} {% else %} <h4>You need to be logged in to see comments</h4> {% endif%} </div>