From 9e4dcbe6fc44b7b158080e66589f7b2eed485f53 Mon Sep 17 00:00:00 2001 From: catborise Date: Thu, 19 Nov 2026 10:07:26 +0300 Subject: [PATCH] fix(tags): the Tags page shows small tag badges as the other pages Its badges were the full badge size; they are the tag badge every other page shows. --- admin/templates/admin/tag_list.html | 2 +- admin/tests/test_tags.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/templates/admin/tag_list.html b/admin/templates/admin/tag_list.html index 5dba6c76..0694c514 100644 --- a/admin/templates/admin/tag_list.html +++ b/admin/templates/admin/tag_list.html @@ -24,7 +24,7 @@ {% for tag in tags %} - {% bs_icon 'tag' %} {{ tag }} + {% include 'common/tag_badge.html' with tag=tag.name %} {{ tag.vm_count }} {{ tag.host_count }} diff --git a/admin/tests/test_tags.py b/admin/tests/test_tags.py index 866f8c1e..a52b7f0f 100644 --- a/admin/tests/test_tags.py +++ b/admin/tests/test_tags.py @@ -28,6 +28,7 @@ class TagAdminTests(TestCase): def test_the_list_counts_each_tag_s_vms_and_hosts(self): response = self.client.get(reverse("admin:tag_list")) self.assertEqual([(t.name, t.vm_count, t.host_count) for t in response.context["tags"]], [("prod", 1, 1)]) + self.assertContains(response, 'class="badge tag-badge') # as small as on the other pages def test_a_rename_keeps_the_tag_on_its_vms_hosts_and_removed_vms(self): self.client.post(reverse("admin:tag_update", args=[self.prod.pk]), {"name": "Live"})