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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user