mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-29 14:06:32 +02:00
admin: add favicon, fix button height bug, remove link from table caption, add search helper text to logentry, remove submit buttons from logentry
This commit is contained in:
parent
74ea2e0be7
commit
7e918ff537
6 changed files with 61 additions and 6 deletions
|
@ -6,9 +6,20 @@ from django.http.response import HttpResponseRedirect
|
|||
from django.urls import reverse
|
||||
from registrar.models.utility.admin_sort_fields import AdminSortFields
|
||||
from . import models
|
||||
from auditlog.models import LogEntry # type: ignore
|
||||
from auditlog.admin import LogEntryAdmin # type: ignore
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
class CustomLogEntryAdmin(LogEntryAdmin):
|
||||
# Overwrite the generated LogEntry admin class
|
||||
|
||||
search_help_text = "Search by resource, changed field, or user."
|
||||
|
||||
change_form_template = 'admin/change_form_no_submit.html'
|
||||
add_form_template = 'admin/change_form_no_submit.html'
|
||||
|
||||
|
||||
class AuditedAdmin(admin.ModelAdmin, AdminSortFields):
|
||||
"""Custom admin to make auditing easier."""
|
||||
|
@ -400,6 +411,8 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
|||
return super().change_view(request, object_id, form_url, extra_context)
|
||||
|
||||
|
||||
admin.site.unregister(LogEntry) # Unregister the default registration
|
||||
admin.site.register(LogEntry, CustomLogEntryAdmin)
|
||||
admin.site.register(models.User, MyUserAdmin)
|
||||
admin.site.register(models.UserDomainRole, AuditedAdmin)
|
||||
admin.site.register(models.Contact, ContactAdmin)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue