Add searchbar to hostip

This commit is contained in:
zandercymatics 2025-03-17 14:18:36 -06:00
parent 710fd395b5
commit 6f4f88607a
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1248,6 +1248,11 @@ class HostIpAdmin(AuditedAdmin, ImportExportModelAdmin):
resource_classes = [HostIpResource]
model = models.HostIP
search_fields = ["host__name", "address"]
search_help_text = "Search by host name or address."
list_display = ("host", "address",)
class ContactResource(resources.ModelResource):
"""defines how each field in the referenced model should be mapped to the corresponding fields in the