added HostIP

This commit is contained in:
David Kennedy 2024-05-09 11:31:11 -04:00
parent 943b14fe01
commit 55e47d03cd
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 17 additions and 2 deletions

View file

@ -23,6 +23,7 @@ need to be exported:
* DraftDomain
* Websites
* Host
* HostIP
### Import
@ -42,6 +43,7 @@ Delete all rows from tables in the following order through django admin:
* Contact
* Websites
* DraftDomain
* HostIP
* Host
#### Importing into Target Environment
@ -53,6 +55,7 @@ order:
* Contact
* Domain
* Host
* HostIP
* DraftDomain
* Websites
* DomainRequest

View file

@ -773,6 +773,19 @@ class MyHostAdmin(AuditedAdmin, ImportExportModelAdmin):
inlines = [HostIPInline]
class HostIpResource(resources.ModelResource):
class Meta:
model = models.HostIP
class HostIpAdmin(AuditedAdmin, ImportExportModelAdmin):
"""Custom host ip admin class"""
resource_classes = [HostIpResource]
model = models.HostIP
class ContactResource(resources.ModelResource):
class Meta:
@ -2298,9 +2311,8 @@ admin.site.register(models.DomainInformation, DomainInformationAdmin)
admin.site.register(models.Domain, DomainAdmin)
admin.site.register(models.DraftDomain, DraftDomainAdmin)
admin.site.register(models.FederalAgency, FederalAgencyAdmin)
# Host and HostIP removed from django admin because changes in admin
# do not propagate to registry and logic not applied
admin.site.register(models.Host, MyHostAdmin)
admin.site.register(models.HostIP, HostIpAdmin)
admin.site.register(models.Website, WebsiteAdmin)
admin.site.register(models.PublicContact, PublicContactAdmin)
admin.site.register(models.DomainRequest, DomainRequestAdmin)