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>
|
<body>
|
||||||
<h1>Your To-Do List</h1>
|
<h1>Your To-Do List</h1>
|
||||||
<form method="POST">
|
<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 %}
|
{% csrf_token %}
|
||||||
</form>
|
</form>
|
||||||
<table id="id-list-table">
|
<table id="id-list-table">
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<tr><td>1: {{ item.text }}</td></tr>
|
<tr><td>{{ forloop.counter }}: {{ item.text }}</td></tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user