I am creating a to-do list using Flask and I have a base.html
page, using this for the actual tags to organize the website
Getting the error
jinja2.exceptions.TemplateSyntaxError
jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'endblock'. You probably made a nesting mistake. Jinja is expecting this tag, but currently looking for 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.
My code:
{% extends 'base.html' %}
{% block head %}
{% endblock %}
{% block body %}
<div class="content">
<h1>Task Master</h1>
<table>
<tr>
<th>Task</th>
<th>Added</th>
<th>Actions</th>
</tr>
{% for task in tasks %}
<tr>
<td>{{ task.content }}</td>
<td>{{ tasks.date_created.date() }}</td>
<td>
<a href="">Delete</a>
<br>
<a href="">Update</a>
</td>
</tr>
(% endfor %)
</table>
<form action="/" method="POST">
<input type="text" name="content" id="content">
<input type="submit" value="Add Task">
</form>
</div>
{% endblock %}