Comments Not Displaying

44 views
Skip to first unread message

coded kid

unread,
Feb 14, 2012, 7:02:58 AM2/14/12
to Django users
Hi guys, I'm using Django.contrib.comments in my Django web app. After
installing django comments and setting up all other things, I decided
to give it a try by commenting on my status.

I commented and I was redirected to /comment/posted/. But the problem
I'm facing is that, Django comments is not displaying my comments. I
can't find it anywhere but it will save it in the DB. What I'm I
missing?

{% load comments %}
{% get_comment_count for sol as comment_count %}
{% get_comment_list for sol as comment_list %}
{% get_comment_form for sol as form %}



{% if user.is_authenticated %}
<form action="{% comment_form_target %}" method="post">
{% csrf_token %}
{% if next %}<input name="next" type="hidden"
value="{{ next }}" />{% endif %}
{% for field in form %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% if field.name != "name" and field.name != "email"
and field.name != "url" %}
{% if field.errors %}{{ field.errors }}{% endif %}
{{ field }}
{% endif %}
{% endif %}
{% endfor %}
<input class="submit-post" name="post" type="submit"
value="Post" />
</form>
{% else %}
I'm sorry, but you must be <a href="javascript:alert('send to
login page')">logged in</a> to submit comments.
{% endif %}

Daniel Roseman

unread,
Feb 14, 2012, 7:32:16 AM2/14/12
to django...@googlegroups.com
OK, so where in the template above are you actually asking it to display comment_list?
--
DR. 

coded kid

unread,
Feb 14, 2012, 9:45:23 AM2/14/12
to Django users
Below the status. I'm not sure if I fixed this. How will I make it
display comment? Please.

Tom Evans

unread,
Feb 14, 2012, 9:47:34 AM2/14/12
to django...@googlegroups.com
On Tue, Feb 14, 2012 at 2:45 PM, coded kid <duffle...@gmail.com> wrote:
> Below the status. I'm not sure if I fixed this. How will I make it
> display comment? Please.
>

This page has some hints:

https://docs.djangoproject.com/en/1.3/ref/contrib/comments/#displaying-comments

Cheers

Tom

coded kid

unread,
Feb 15, 2012, 7:22:31 AM2/15/12
to Django users
Thanks bro! Just got the logic! Cheers. @Daniel keep up the good work,
even if you once hit me in the ass on StackOverflow! :)

On Feb 14, 3:47 pm, Tom Evans <tevans...@googlemail.com> wrote:
> On Tue, Feb 14, 2012 at 2:45 PM, coded kid <duffleboi...@gmail.com> wrote:
> > Below the status. I'm not sure if I fixed this. How will I make it
> > display comment? Please.
>
> This page has some hints:
>
> https://docs.djangoproject.com/en/1.3/ref/contrib/comments/#displayin...
>
> Cheers
>
> Tom
Reply all
Reply to author
Forward
0 new messages