other files inadvertently skipped in prev commit
This commit is contained in:
@@ -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')
|
||||||
|
|||||||
@@ -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>
|
|
||||||
|
|||||||
@@ -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 %}
|
<table id="id-list-table">
|
||||||
</form>
|
{% for item in list.item_set.all %}
|
||||||
<table id="id-list-table">
|
<tr><td>{{ forloop.counter }}. {{ item.text }}</td></tr>
|
||||||
{% for item in list.item_set.all %}
|
{% endfor %}
|
||||||
<tr><td>{{ forloop.counter }}. {{ item.text }}</td></tr>
|
</table>
|
||||||
{% endfor %}
|
{% endblock table %}
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user