mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
Fix lint errors
This commit is contained in:
parent
0a80cb1c62
commit
a2a43b66b4
4 changed files with 10 additions and 10 deletions
|
@ -2655,6 +2655,7 @@ class WaffleFlagAdmin(FlagAdmin):
|
||||||
model = models.WaffleFlag
|
model = models.WaffleFlag
|
||||||
fields = "__all__"
|
fields = "__all__"
|
||||||
|
|
||||||
|
|
||||||
class DomainGroupResource(resources.ModelResource):
|
class DomainGroupResource(resources.ModelResource):
|
||||||
"""defines how each field in the referenced model should be mapped to the corresponding fields in the
|
"""defines how each field in the referenced model should be mapped to the corresponding fields in the
|
||||||
import/export file"""
|
import/export file"""
|
||||||
|
@ -2662,10 +2663,12 @@ class DomainGroupResource(resources.ModelResource):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.DomainGroup
|
model = models.DomainGroup
|
||||||
|
|
||||||
|
|
||||||
class DomainGroupAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
class DomainGroupAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
resource_classes = [DomainGroupResource]
|
resource_classes = [DomainGroupResource]
|
||||||
list_display = ["name", "portfolio"]
|
list_display = ["name", "portfolio"]
|
||||||
|
|
||||||
|
|
||||||
class SuborganizationResource(resources.ModelResource):
|
class SuborganizationResource(resources.ModelResource):
|
||||||
"""defines how each field in the referenced model should be mapped to the corresponding fields in the
|
"""defines how each field in the referenced model should be mapped to the corresponding fields in the
|
||||||
import/export file"""
|
import/export file"""
|
||||||
|
@ -2673,10 +2676,12 @@ class SuborganizationResource(resources.ModelResource):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.Suborganization
|
model = models.Suborganization
|
||||||
|
|
||||||
|
|
||||||
class SuborganizationAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
class SuborganizationAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
resource_classes = [SuborganizationResource]
|
resource_classes = [SuborganizationResource]
|
||||||
list_display = ["name", "portfolio"]
|
list_display = ["name", "portfolio"]
|
||||||
|
|
||||||
|
|
||||||
admin.site.unregister(LogEntry) # Unregister the default registration
|
admin.site.unregister(LogEntry) # Unregister the default registration
|
||||||
|
|
||||||
admin.site.register(LogEntry, CustomLogEntryAdmin)
|
admin.site.register(LogEntry, CustomLogEntryAdmin)
|
||||||
|
|
|
@ -41,7 +41,7 @@ __all__ = [
|
||||||
"WaffleFlag",
|
"WaffleFlag",
|
||||||
"Portfolio",
|
"Portfolio",
|
||||||
"DomainGroup",
|
"DomainGroup",
|
||||||
"Suborganization"
|
"Suborganization",
|
||||||
]
|
]
|
||||||
|
|
||||||
auditlog.register(Contact)
|
auditlog.register(Contact)
|
||||||
|
|
|
@ -19,15 +19,9 @@ class DomainGroup(TimeStampedModel):
|
||||||
help_text="Domain group",
|
help_text="Domain group",
|
||||||
)
|
)
|
||||||
|
|
||||||
portfolio = models.ForeignKey(
|
portfolio = models.ForeignKey("registrar.Portfolio", on_delete=models.PROTECT)
|
||||||
"registrar.Portfolio",
|
|
||||||
on_delete=models.PROTECT
|
|
||||||
)
|
|
||||||
|
|
||||||
domains = models.ManyToManyField(
|
domains = models.ManyToManyField("registrar.DomainInformation", blank=True)
|
||||||
"registrar.DomainInformation",
|
|
||||||
blank=True
|
|
||||||
)
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return f"{self.name}"
|
return f"{self.name}"
|
||||||
|
|
|
@ -7,6 +7,7 @@ class Suborganization(TimeStampedModel):
|
||||||
"""
|
"""
|
||||||
Suborganization under an organization (portfolio)
|
Suborganization under an organization (portfolio)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
name = models.CharField(
|
name = models.CharField(
|
||||||
null=True,
|
null=True,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue