diff --git a/games/templates/gamestatuschange_list.html b/games/templates/gamestatuschange_list.html deleted file mode 100644 index 47eba8a..0000000 --- a/games/templates/gamestatuschange_list.html +++ /dev/null @@ -1,7 +0,0 @@ - - {% load static %} -
- -
-
- \ No newline at end of file diff --git a/games/templates/list_playevents.html b/games/templates/list_playevents.html index 586648b..30361a0 100644 --- a/games/templates/list_playevents.html +++ b/games/templates/list_playevents.html @@ -1,6 +1,6 @@ {% load static %}
- + {% include "simple_table.html" with rows=data.rows columns=data.columns page_obj=page_obj elided_page_range=elided_page_range header_action=data.header_action %}
diff --git a/games/templates/list_purchases.html b/games/templates/list_purchases.html index 586648b..30361a0 100644 --- a/games/templates/list_purchases.html +++ b/games/templates/list_purchases.html @@ -1,6 +1,6 @@ {% load static %}
- + {% include "simple_table.html" with rows=data.rows columns=data.columns page_obj=page_obj elided_page_range=elided_page_range header_action=data.header_action %}
diff --git a/games/templates/cotton/simple_table.html b/games/templates/simple_table.html similarity index 100% rename from games/templates/cotton/simple_table.html rename to games/templates/simple_table.html diff --git a/games/templates/view_game.html b/games/templates/view_game.html index 586606a..4dad538 100644 --- a/games/templates/view_game.html +++ b/games/templates/view_game.html @@ -138,7 +138,7 @@
Purchases {% if purchase_count %} - + {% include "simple_table.html" with rows=purchase_data.rows columns=purchase_data.columns page_obj=None elided_page_range=None header_action=None %} {% else %} No purchases yet. {% endif %} @@ -146,7 +146,7 @@
Sessions {% if session_count %} - + {% include "simple_table.html" with rows=session_data.rows columns=session_data.columns header_action=session_data.header_action page_obj=session_page_obj elided_page_range=session_elided_page_range %} {% else %} No sessions yet. {% endif %} @@ -155,7 +155,7 @@
Play Events {% if playevent_count %} - + {% include "simple_table.html" with rows=playevent_data.rows columns=playevent_data.columns page_obj=None elided_page_range=None header_action=None %} {% else %} No play events yet. {% endif %} diff --git a/tests/test_components.py b/tests/test_components.py index 4578cb3..5f1e864 100644 --- a/tests/test_components.py +++ b/tests/test_components.py @@ -966,7 +966,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify list-style rows render as with + .""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Game", "Started", "Ended"], "rows": [["Game1", "2025-01-01", "2025-03-01"]], @@ -990,7 +990,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify empty rows list renders empty .""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Game", "Started"], "rows": [], @@ -1008,7 +1008,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify multiple rows all render.""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Game", "Started"], "rows": [["GameA", "2025-01-01"], ["GameB", "2025-02-01"]], @@ -1028,7 +1028,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify dict-style rows with row_id and cell_data render correctly.""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Name", "Date"], "rows": [ @@ -1055,7 +1055,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify empty rows list renders empty .""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Game", "Started"], "rows": [], @@ -1073,7 +1073,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify multiple rows all render.""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Game", "Started"], "rows": [["GameA", "2025-01-01"], ["GameB", "2025-02-01"]], @@ -1093,7 +1093,7 @@ class SimpleTableRenderingTest(unittest.TestCase): from django.template.loader import render_to_string from django.utils.safestring import mark_safe result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Game", "Started"], "rows": [["Game1", "2025-01-01"]], @@ -1110,7 +1110,7 @@ class SimpleTableRenderingTest(unittest.TestCase): """Verify dict-style rows with row_id and cell_data render correctly.""" from django.template.loader import render_to_string result = render_to_string( - "cotton/simple_table.html", + "simple_table.html", { "columns": ["Name", "Date"], "rows": [