mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 11:16:07 +02:00
Add custom desc on delete button
This commit is contained in:
parent
7a7000cf9d
commit
0ef72ad016
5 changed files with 37 additions and 5 deletions
|
@ -1339,6 +1339,18 @@ class DomainAdmin(ListHeaderAdmin):
|
|||
# Table ordering
|
||||
ordering = ["name"]
|
||||
|
||||
def delete_view(self, request, object_id, extra_context=None):
|
||||
"""
|
||||
Custom delete_view to perform additional actions or customize the template.
|
||||
"""
|
||||
|
||||
# Set the delete template to a custom one
|
||||
self.delete_confirmation_template = "django/admin/domain_delete_confirmation.html"
|
||||
|
||||
response = super().delete_view(request, object_id, extra_context=extra_context)
|
||||
|
||||
return response
|
||||
|
||||
def changeform_view(self, request, object_id=None, form_url="", extra_context=None):
|
||||
"""Custom changeform implementation to pass in context information"""
|
||||
if extra_context is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue