I'm stuck on this error I am a new user of Django I am following the steps correctly and learning through YT.
When I run python manage.py runserver the HTML shows
My index.html file
<!DOCTYPE html>
<header>
CRUD Operation with PostgreSQL
</header>
<body>
<center>
<h1>How to create CURD Ops with PostgreSQL</h1>
<h3>Learning Django and CURD</h3>
<hr/>
<table border = "1">
<tr>
<th>Employee Id</th>
<th>Employee Name</th>
<th>Email</th>
<th>Occupation</th>
<th>Salary</th>
<th>Gender</th>
</tr>
{% for results in data% }
<tr>
<td>{{result.id}}</td>
<td>{{result.name}}</td>
<td>{{result.email}}</td>
<td>{{result.occupation}}</td>
<td>{{result.salary}}</td>
<td>{{result.gender}}</td>
</tr>
{% endfor %}
</table>
</center>
</body>
I tried to change endfor to endblock nothing works. I don't know how to solve this.
Look at your code here:
You need to change
{% for results in data% }to{% for result in data %}. Be careful, where you put whitespaces and look at pluralresultsin for loop, when you actually uses singularresultinside it.