[Answer]-How to get comments from single post in template?

1👍

In the views:

def single_post(request,slug):
    p = Post.objects.get(slug=slug)
    cat = Category.objects.all()
    comments = Comment.objects.filter(post=post)
    return render_to_response('single_post.html',{'p':p,'cat':cat, 'comments':comments},context_instance=RequestContext(request))

In the template, something like:

{% for comment in comments %}
    {{ comment.body}}
{% endfor %}

Leave a comment