other files inadvertently skipped in prev commit

This commit is contained in:
Disco DeDisco
2026-01-03 19:21:40 -05:00
parent a393628ca2
commit 8955d51474
3 changed files with 23 additions and 31 deletions

View File

@@ -33,9 +33,9 @@ class NewVisitorTest(LiveServerTestCase):
def test_can_start_a_todo_list(self): def test_can_start_a_todo_list(self):
self.browser.get(self.live_server_url) self.browser.get(self.live_server_url)
self.assertIn('Dashboard', self.browser.title) self.assertIn('Dashboard | ', self.browser.title)
header_text = self.browser.find_element(By.TAG_NAME, 'h1').text header_text = self.browser.find_element(By.TAG_NAME, 'h1').text
self.assertIn('Dashboard', header_text) self.assertIn('Dashboard | ', header_text)
inputbox = self.browser.find_element(By.ID, 'id-new-item') inputbox = self.browser.find_element(By.ID, 'id-new-item')
self.assertEqual(inputbox.get_attribute('placeholder'), 'Enter a to-do item') self.assertEqual(inputbox.get_attribute('placeholder'), 'Enter a to-do item')

View File

@@ -1,12 +1,6 @@
<html> {% extends "core/base.html" %}
<head>
<title>Dashboard</title> {% block title_text %}Start a new to-do list{% endblock title_text %}
</head> {% block header_text %}Start a new to-do list{% endblock header_text %}
<body>
<h1>Dashboard | Start a new to-do list</h1> {% block form_action %}/apps/dashboard/newlist{% endblock form_action %}
<form method="POST" action="/apps/dashboard/newlist">
<input name="item_text" id="id-new-item" placeholder="Enter a to-do item">
{% csrf_token %}
</form>
</body>
</html>

View File

@@ -1,17 +1,15 @@
<html> {% extends "core/base.html" %}
<head>
<title>To-Do lists</title> {% block title_text %}Your to-do list{% endblock title_text %}
</head> {% block header_text %}Your to-do list{% endblock header_text %}
<body>
<h1>Your To-Do List</h1> {% block form_action %}/apps/dashboard/{{ list.id }}/add-item{% endblock form_action %}
<form method="POST" action="/apps/dashboard/{{ list.id }}/add-item">
<input name="item_text" id="id-new-item" placeholder="Enter a to-do item"> {% block table %}
{% csrf_token %}
</form>
<table id="id-list-table"> <table id="id-list-table">
{% for item in list.item_set.all %} {% for item in list.item_set.all %}
<tr><td>{{ forloop.counter }}. {{ item.text }}</td></tr> <tr><td>{{ forloop.counter }}. {{ item.text }}</td></tr>
{% endfor %} {% endfor %}
</table> </table>
</body> {% endblock table %}
</html>