Add notes to DomainInformation

This commit is contained in:
zandercymatics 2024-01-24 15:38:08 -07:00
parent 2a345cddb9
commit 29621a6184
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
5 changed files with 17 additions and 5 deletions

View file

@ -570,7 +570,7 @@ class DomainInformationAdmin(ListHeaderAdmin):
search_help_text = "Search by domain." search_help_text = "Search by domain."
fieldsets = [ fieldsets = [
(None, {"fields": ["creator", "domain_application"]}), (None, {"fields": ["creator", "domain_application", "notes"]}),
( (
"Type of organization", "Type of organization",
{ {

View file

@ -1,4 +1,4 @@
# Generated by Django 4.2.7 on 2024-01-24 20:34 # Generated by Django 4.2.7 on 2024-01-24 22:28
from django.db import migrations, models from django.db import migrations, models
@ -17,6 +17,11 @@ class Migration(migrations.Migration):
migrations.AddField( migrations.AddField(
model_name="domainapplication", model_name="domainapplication",
name="notes", name="notes",
field=models.TextField(blank=True, help_text="Notes about this application", null=True), field=models.TextField(blank=True, help_text="Notes about this request", null=True),
),
migrations.AddField(
model_name="domaininformation",
name="notes",
field=models.TextField(blank=True, help_text="Notes about the request", null=True),
), ),
] ]

View file

@ -559,7 +559,7 @@ class DomainApplication(TimeStampedModel):
notes = models.TextField( notes = models.TextField(
null=True, null=True,
blank=True, blank=True,
help_text="Notes about this application", help_text="Notes about this request",
) )
def __str__(self): def __str__(self):
@ -711,7 +711,7 @@ class DomainApplication(TimeStampedModel):
# copy the information from domainapplication into domaininformation # copy the information from domainapplication into domaininformation
DomainInformation = apps.get_model("registrar.DomainInformation") DomainInformation = apps.get_model("registrar.DomainInformation")
DomainInformation.create_from_da(self, domain=created_domain) DomainInformation.create_from_da(domain_application=self, domain=created_domain)
# create the permission for the user # create the permission for the user
UserDomainRole = apps.get_model("registrar.UserDomainRole") UserDomainRole = apps.get_model("registrar.UserDomainRole")

View file

@ -203,6 +203,12 @@ class DomainInformation(TimeStampedModel):
help_text="Acknowledged .gov acceptable use policy", help_text="Acknowledged .gov acceptable use policy",
) )
notes = models.TextField(
null=True,
blank=True,
help_text="Notes about the request",
)
def __str__(self): def __str__(self):
try: try:
if self.domain and self.domain.name: if self.domain and self.domain.name:

View file

@ -624,6 +624,7 @@ class TestDomainApplicationAdmin(MockEppLib):
"anything_else", "anything_else",
"is_policy_acknowledged", "is_policy_acknowledged",
"submission_date", "submission_date",
"notes",
"current_websites", "current_websites",
"other_contacts", "other_contacts",
"alternative_domains", "alternative_domains",