Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango Paginated Comments .. is there any existing solutions?
    text
    copied!<p>is there any existing pagination solution for Django contrib.comments?</p> <p>What I need is just a simple paginated django comments, for the Basic Blog application (from the Django Basic Apps) I used, using a <a href="http://code.djangoproject.com/wiki/UsingFreeComment" rel="nofollow noreferrer">simple has_previous and has_next</a></p> <p>I have copied the django.contrib.comments and tried modify the code but with no success. The code is pretty hard to understand (django/contrib/comments/templatetags/comments.py) because it consists of Node and Parser </p> <p>here is my comments.html template I used for the Blog application:</p> <pre><code>{% load comments markup %} {% get_comment_list for object as comment_list %} {% if comment_list %} &lt;div class="comments g_7 left"&gt; &lt;a name="comments"&gt;&lt;/a&gt; &lt;div class="subtitle"&gt;Comments&lt;/div&gt; {% for comment in comment_list %} {% if comment.is_public %} &lt;div class="comment g_6" id="c{{ comment.id }}"&gt; &lt;div class="comment_name g_6"&gt; &lt;div class="comment_count right"&gt; &lt;a name="c{{ comment.id }}" href="{{ comment.get_absolute_url }}" {% ifnotequal comment.person_name null %}title="Permalink to {{ comment.person_name }}'s comment"{% endifnotequal %} class="comment_count"&gt;{{ forloop.counter }}&lt;/a&gt;&lt;/div&gt; Wrote by &lt;strong&gt;{% if comment.user_url %}&lt;a href="{{ comment.user_url }}"&gt;{{ comment.user_name }}&lt;/a&gt;{% else %}{{ comment.user_name }}{% endif %}&lt;/strong&gt; on {{ comment.submit_date|date:"F j, Y" }} - {{ comment.submit_date|date:"P" }} &lt;/div&gt; &lt;div class="comment_body g_6"&gt;{{ comment.comment|urlizetrunc:"60"|safe }}&lt;/div&gt; &lt;/div&gt; {% endif %} {% endfor %} &lt;div class="clear"&gt;&lt;/div&gt; &lt;/div&gt; {% else %} No comments yet. {% endif %} </code></pre> <p>I think the problem lies in the <strong>get_comment_list</strong> templatetags :)</p> <p>Thanks in advance</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