Add fields

This commit is contained in:
zandercymatics 2024-06-26 09:37:47 -06:00
parent 0fecc199d0
commit 5d68031dce
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
4 changed files with 84 additions and 2 deletions

View file

@ -1321,6 +1321,7 @@ class DomainInformationAdmin(ListHeaderAdmin, ImportExportModelAdmin):
superuser_only_fields = [ superuser_only_fields = [
"portfolio", "portfolio",
"sub_organization",
] ]
# DEVELOPER's NOTE: # DEVELOPER's NOTE:
@ -1621,6 +1622,7 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
superuser_only_fields = [ superuser_only_fields = [
"portfolio", "portfolio",
"sub_organization",
] ]
# DEVELOPER's NOTE: # DEVELOPER's NOTE:

View file

@ -0,0 +1,62 @@
# Generated by Django 4.2.10 on 2024-06-26 15:34
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("registrar", "0106_create_groups_v14"),
]
operations = [
migrations.AddField(
model_name="domaininformation",
name="sub_organization",
field=models.ForeignKey(
blank=True,
help_text="The suborganization that this domain is included under",
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="information_sub_organization",
to="registrar.suborganization",
),
),
migrations.AddField(
model_name="domainrequest",
name="sub_organization",
field=models.ForeignKey(
blank=True,
help_text="The suborganization that this domain request is included under",
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="request_sub_organization",
to="registrar.suborganization",
),
),
migrations.AlterField(
model_name="domaininformation",
name="portfolio",
field=models.ForeignKey(
blank=True,
help_text="Portfolio associated with this domain",
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="information_portfolio",
to="registrar.portfolio",
),
),
migrations.AlterField(
model_name="domainrequest",
name="portfolio",
field=models.ForeignKey(
blank=True,
help_text="Portfolio associated with this domain request",
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="DomainRequest_portfolio",
to="registrar.portfolio",
),
),
]

View file

@ -63,10 +63,19 @@ class DomainInformation(TimeStampedModel):
on_delete=models.PROTECT, on_delete=models.PROTECT,
null=True, null=True,
blank=True, blank=True,
related_name="DomainRequest_portfolio", related_name="information_portfolio",
help_text="Portfolio associated with this domain", help_text="Portfolio associated with this domain",
) )
sub_organization = models.ForeignKey(
"registrar.Suborganization",
on_delete=models.PROTECT,
null=True,
blank=True,
related_name="information_sub_organization",
help_text="The suborganization that this domain is included under",
)
domain_request = models.OneToOneField( domain_request = models.OneToOneField(
"registrar.DomainRequest", "registrar.DomainRequest",
on_delete=models.PROTECT, on_delete=models.PROTECT,

View file

@ -311,10 +311,19 @@ class DomainRequest(TimeStampedModel):
on_delete=models.PROTECT, on_delete=models.PROTECT,
null=True, null=True,
blank=True, blank=True,
related_name="DomainInformation_portfolio", related_name="DomainRequest_portfolio",
help_text="Portfolio associated with this domain request", help_text="Portfolio associated with this domain request",
) )
sub_organization = models.ForeignKey(
"registrar.Suborganization",
on_delete=models.PROTECT,
null=True,
blank=True,
related_name="request_sub_organization",
help_text="The suborganization that this domain request is included under",
)
# This is the domain request user who created this domain request. The contact # This is the domain request user who created this domain request. The contact
# information that they gave is in the `submitter` field # information that they gave is in the `submitter` field
creator = models.ForeignKey( creator = models.ForeignKey(