From 08305532c273b196e4009ed6821fceeae1dc22ca Mon Sep 17 00:00:00 2001 From: Disco DeDisco Date: Sat, 3 Jan 2026 20:05:41 -0500 Subject: [PATCH] bootstrap libraries added via cdn js & css script & link tags; some bootstrap styling added to base.html & list.html; unit tests updated to accomodate html parsing in assertContains() library fns (but n.b., not all unit tests have been updated to accomodate bootstrap attrs, so some still fail); all FTs currently passing from last commit --- apps/dashboard/tests.py | 12 +++++++-- templates/apps/dashboard/list.html | 2 +- templates/core/base.html | 42 ++++++++++++++++++++++++------ 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/apps/dashboard/tests.py b/apps/dashboard/tests.py index 8a85b66..117ba5c 100644 --- a/apps/dashboard/tests.py +++ b/apps/dashboard/tests.py @@ -9,7 +9,11 @@ class HomePageTest(TestCase): def test_renders_input_form(self): response = self.client.get('/') self.assertContains(response, '
') - self.assertContains(response, '', + html=True, + ) class ListAndItemModelsTest(TestCase): def test_saving_and_retrieving_items(self): @@ -52,7 +56,11 @@ class DashViewTest(TestCase): response, f'', ) - self.assertContains(response, '', + html=True, + ) def test_displays_only_items_for_that_list(self): # Given/Arrange diff --git a/templates/apps/dashboard/list.html b/templates/apps/dashboard/list.html index 9fa70f9..bdb481b 100644 --- a/templates/apps/dashboard/list.html +++ b/templates/apps/dashboard/list.html @@ -6,7 +6,7 @@ {% block form_action %}/apps/dashboard/{{ list.id }}/add-item{% endblock form_action %} {% block table %} - +
{% for item in list.item_set.all %} {% endfor %} diff --git a/templates/core/base.html b/templates/core/base.html index 9a65c2e..b90b2c8 100644 --- a/templates/core/base.html +++ b/templates/core/base.html @@ -1,19 +1,45 @@ - + + Dashboard | {% block title_text %}{% endblock title_text %} + + -

Dashboard | {% block header_text %}{% endblock header_text %}

- - - {% csrf_token %} - - {% block table %} - {% endblock table %} +
+
+
+

Dashboard | {% block header_text %}{% endblock header_text %}

+ +
+ + {% csrf_token %} + +
+
+ +
+
+ {% block table %} + {% endblock table %} +
+
+ +
+ + + \ No newline at end of file
{{ forloop.counter }}. {{ item.text }}