mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Remove template_name overrides from locale, sites, and groups viewsets in favour of the viewset's template_prefix
This commit is contained in:
parent
849dd5124b
commit
71aa1d2a3e
@ -49,7 +49,6 @@ class IndexView(generic.IndexView):
|
||||
class CreateView(generic.CreateView):
|
||||
page_title = gettext_lazy("Add locale")
|
||||
success_message = gettext_lazy("Locale '%(object)s' created.")
|
||||
template_name = "wagtaillocales/create.html"
|
||||
|
||||
|
||||
class EditView(generic.EditView):
|
||||
@ -57,7 +56,6 @@ class EditView(generic.EditView):
|
||||
error_message = gettext_lazy("The locale could not be saved due to errors.")
|
||||
delete_item_label = gettext_lazy("Delete locale")
|
||||
context_object_name = "locale"
|
||||
template_name = "wagtaillocales/edit.html"
|
||||
queryset = Locale.all_objects.all()
|
||||
|
||||
|
||||
@ -65,7 +63,6 @@ class DeleteView(generic.DeleteView):
|
||||
success_message = gettext_lazy("Locale '%(object)s' deleted.")
|
||||
page_title = gettext_lazy("Delete locale")
|
||||
confirmation_message = gettext_lazy("Are you sure you want to delete this locale?")
|
||||
template_name = "wagtaillocales/confirm_delete.html"
|
||||
queryset = Locale.all_objects.all()
|
||||
|
||||
def can_delete(self, locale):
|
||||
|
@ -32,7 +32,6 @@ class IndexView(generic.IndexView):
|
||||
class CreateView(generic.CreateView):
|
||||
page_title = _("Add site")
|
||||
success_message = _("Site '%(object)s' created.")
|
||||
template_name = "wagtailsites/create.html"
|
||||
|
||||
|
||||
class EditView(generic.EditView):
|
||||
@ -40,7 +39,6 @@ class EditView(generic.EditView):
|
||||
error_message = _("The site could not be saved due to errors.")
|
||||
delete_item_label = _("Delete site")
|
||||
context_object_name = "site"
|
||||
template_name = "wagtailsites/edit.html"
|
||||
|
||||
|
||||
class DeleteView(generic.DeleteView):
|
||||
|
@ -53,8 +53,6 @@ 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")
|
||||
search_box_placeholder = _("Search groups")
|
||||
@ -77,7 +75,6 @@ class IndexView(generic.IndexView):
|
||||
class CreateView(PermissionPanelFormsMixin, generic.CreateView):
|
||||
page_title = _("Add group")
|
||||
success_message = _("Group '%(object)s' created.")
|
||||
template_name = "wagtailusers/groups/create.html"
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
"""
|
||||
@ -116,7 +113,6 @@ class EditView(PermissionPanelFormsMixin, generic.EditView):
|
||||
error_message = _("The group could not be saved due to errors.")
|
||||
delete_item_label = _("Delete group")
|
||||
context_object_name = "group"
|
||||
template_name = "wagtailusers/groups/edit.html"
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
"""
|
||||
@ -153,7 +149,6 @@ class DeleteView(generic.DeleteView):
|
||||
success_message = _("Group '%(object)s' deleted.")
|
||||
page_title = _("Delete group")
|
||||
confirmation_message = _("Are you sure you want to delete this group?")
|
||||
template_name = "wagtailusers/groups/confirm_delete.html"
|
||||
|
||||
|
||||
class GroupViewSet(ModelViewSet):
|
||||
|
Loading…
Reference in New Issue
Block a user