Actually add comments to blog, tidy up rst handling to make sure we get xhtml1.1...
[sommitrealweird.git] / sommitrealweird / blog / templates / blog / single_entry_rst.html
index 9b49f5539dccb7dcd4f0867a877530bed3c7c791..0d99d90a3eda7c73ba75546d35b5d27a538eaf90 100644 (file)
@@ -1,6 +1,7 @@
 {% extends "base.html" %}
 
 {% load xhtml11rst %}
+{% load comments %}
 
 {% block content %}
 <h1>{{ entry.title }}</h1>
         {% endif %}
     {% endfor %}
     {% endif %}
-    <a href="{{ entry.get_absolute_url }}">permalink</a>
+    {% get_comment_count for entry as comment_count %}
+    <a href="{{ entry.get_absolute_url }}">permalink</a> | Comments: {{ comment_count }}
 </p>
+{% if comment_count %}
+    <div class="comments">
+    <a name="comments"></a>
+    {% get_comment_list for entry as comment_list %}
+    {% for comment in comment_list %}
+    <div class="comment">
+        <h3>{{ comment.user_name }} - {{ comment.submit_date|date:"Y-m-d H:i" }}</h3>
+        {{ comment.comment }}
+    </div>
+    {% endfor %}
+    </div>
+{% endif %}
+<div class="comment_new">
+    {% render_comment_form for entry %}
+</div>
 {% endblock %}