Hi everyone
i apologize in advance if its a silly question but it really annoying
i have a list filled with some data as below
like = []
dislike = []
for i in range(len(comment_counts)):
like.append(comment_counts[i].like_count)
dislike.append(comment_counts[i].dislike_count)
context['like_count'] = like
context['dislike_count'] = dislike
and a peace of mu template page
{% for comment in good.comments.all %}
<p>
<span class = "font-weight-bold">
{{comment.customer.first_name}} {{comment.customer.last_name}} --
</span>
{{comment.text}}
<a href="{% url 'edit_comment' pk=good.pk cpk=comment.pk %}">ویرایش</a> |
<a href="{% url 'delete_comment' pk=good.pk cpk=comment.pk %}">حذف</a>
<p dir="ltr">
<label>آیا این نظر مفید بود؟</label>
<form action="{% url 'comment_votes' pk=good.pk cpk=comment.pk %}" dir="ltr" method="post">
{% csrf_token %}
<button dir="ltr" class="btn btn-primary btn-sm" type="submit" name="up"
value="{{comment.id}}">موافقم
</button>
<button dir="ltr" class="btn btn-primary btn-sm" type="submit" name="down"
value="{{comment.id}}">مخالفم
</button>
</form>
<p dir="ltr"> <!-- problem is here --!>
{{ dislike.dislike_count.forloop.counter0 }}رای مخالف
--
{{ like.like_count.forloop.counter0 }}رای موافق
</p>
<hr>
</p>
</p>
{% endfor %}
what i want to do is to display data of like and dislike lists in this(<!-- problem is here --!>) part
but it did not show me anything
so any idea how to fix this problem
thanks