I am using a for loop in an HTML Template, it recognizes the fact that they are there but it does not show them in the page like it should.
my views:
person = []
x = people.objects.filter(deal='q')
for person in x:
print(person.name)
if person.paid_status == True:
person.append(lender)
return render(request, '.html', {'person': person})
my template:
<div>
{% if person %}
There are {{ person|length }} persons.
{% for p in person %}
<p> {{ p.name }} </p>
{% endfor %}
{% else %}
<p> As of now no persons have appeared. </p>
{% endif %}
</div>
in the console it prints the persons name correctly so I am confused why it does not work in the HTML
All I see is that there are 2 persons(which is correct) but then it does not list them.
Thanks in advance.