0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Reinstate template for groups/index.html

As per https://github.com/wagtail/wagtail/pull/10540/files#r1226830421 - while we are using generic/index.html unmodified here, giving it a dedicated template file allows people to override it if desired.
This commit is contained in:
Matt Westcott 2023-06-12 17:39:47 +01:00
parent 60f371fae9
commit 81836fc56f
3 changed files with 3 additions and 0 deletions

View File

@ -0,0 +1 @@
{% extends "wagtailadmin/generic/index.html" %}

View File

@ -1291,6 +1291,7 @@ class TestGroupIndexView(WagtailTestUtils, TestCase):
def test_simple(self):
response = self.get()
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "wagtailusers/groups/index.html")
self.assertTemplateUsed(response, "wagtailadmin/generic/index.html")
# response should contain page furniture, including the "Add a group" button
self.assertContains(response, "Add a group")

View File

@ -53,6 +53,7 @@ class PermissionPanelFormsMixin:
class IndexView(generic.IndexView):
template_name = "wagtailusers/groups/index.html"
results_template_name = "wagtailusers/groups/results.html"
page_title = _("Groups")
add_item_label = _("Add a group")