added forloop.counter to list table rows & fixed name attr to use underscore instead of hyphen in home.html (this latter inconsistency caused functional_tests to fail)

This commit is contained in:
Disco DeDisco
2025-12-31 14:54:23 -05:00
parent c318a526fc
commit 2615445b97

View File

@@ -5,12 +5,12 @@
<body>
<h1>Your To-Do List</h1>
<form method="POST">
<input name="item-text" id="id-new-item" placeholder="Enter a to-do item">
<input name="item_text" id="id-new-item" placeholder="Enter a to-do item">
{% csrf_token %}
</form>
<table id="id-list-table">
{% for item in items %}
<tr><td>1: {{ item.text }}</td></tr>
<tr><td>{{ forloop.counter }}: {{ item.text }}</td></tr>
{% endfor %}
</table>
</body>