mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-16 01:27:03 +02:00
Add notes field
This commit is contained in:
parent
9b691affdc
commit
65ff4ece76
5 changed files with 76 additions and 8 deletions
|
@ -737,7 +737,18 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
||||||
# Detail view
|
# Detail view
|
||||||
form = DomainApplicationAdminForm
|
form = DomainApplicationAdminForm
|
||||||
fieldsets = [
|
fieldsets = [
|
||||||
(None, {"fields": ["status", "investigator", "creator", "approved_domain"]}),
|
(
|
||||||
|
None,
|
||||||
|
{
|
||||||
|
"fields": [
|
||||||
|
"status",
|
||||||
|
"investigator",
|
||||||
|
"creator",
|
||||||
|
"approved_domain",
|
||||||
|
"notes"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
),
|
||||||
(
|
(
|
||||||
"Type of organization",
|
"Type of organization",
|
||||||
{
|
{
|
||||||
|
@ -991,6 +1002,22 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
"deleted",
|
"deleted",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
fieldsets = (
|
||||||
|
(
|
||||||
|
None,
|
||||||
|
{
|
||||||
|
"fields": [
|
||||||
|
"name",
|
||||||
|
"state",
|
||||||
|
"expiration_date",
|
||||||
|
"first_ready",
|
||||||
|
"deleted",
|
||||||
|
"notes"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
# this ordering effects the ordering of results
|
# this ordering effects the ordering of results
|
||||||
# in autocomplete_fields for domain
|
# in autocomplete_fields for domain
|
||||||
ordering = ["name"]
|
ordering = ["name"]
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
# Generated by Django 4.2.7 on 2024-01-24 20:34
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
dependencies = [
|
||||||
|
("registrar", "0063_veryimportantperson"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="domain",
|
||||||
|
name="notes",
|
||||||
|
field=models.TextField(blank=True, help_text="Notes about this domain", null=True),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="domainapplication",
|
||||||
|
name="notes",
|
||||||
|
field=models.TextField(blank=True, help_text="Notes about this application", null=True),
|
||||||
|
),
|
||||||
|
]
|
|
@ -992,6 +992,12 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
help_text="The last time this domain moved into the READY state",
|
help_text="The last time this domain moved into the READY state",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
notes = models.TextField(
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
help_text="Notes about this domain",
|
||||||
|
)
|
||||||
|
|
||||||
def isActive(self):
|
def isActive(self):
|
||||||
return self.state == Domain.State.CREATED
|
return self.state == Domain.State.CREATED
|
||||||
|
|
||||||
|
|
|
@ -556,6 +556,12 @@ class DomainApplication(TimeStampedModel):
|
||||||
help_text="Date submitted",
|
help_text="Date submitted",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
notes = models.TextField(
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
help_text="Notes about this application",
|
||||||
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
try:
|
try:
|
||||||
if self.requested_domain and self.requested_domain.name:
|
if self.requested_domain and self.requested_domain.name:
|
||||||
|
|
|
@ -223,13 +223,20 @@ class DomainInformation(TimeStampedModel):
|
||||||
if domain_info:
|
if domain_info:
|
||||||
return domain_info
|
return domain_info
|
||||||
# the following information below is not needed in the domain information:
|
# the following information below is not needed in the domain information:
|
||||||
da_dict.pop("status", None)
|
unused_one_to_one_fields = [
|
||||||
da_dict.pop("current_websites", None)
|
"status",
|
||||||
da_dict.pop("investigator", None)
|
"current_websites",
|
||||||
da_dict.pop("alternative_domains", None)
|
"investigator",
|
||||||
da_dict.pop("requested_domain", None)
|
"alternative_domains",
|
||||||
da_dict.pop("approved_domain", None)
|
"requested_domain",
|
||||||
da_dict.pop("submission_date", None)
|
"approved_domain",
|
||||||
|
"submission_date",
|
||||||
|
"other_contacts",
|
||||||
|
"notes",
|
||||||
|
]
|
||||||
|
for field in unused_one_to_one_fields:
|
||||||
|
da_dict.pop(field, None)
|
||||||
|
|
||||||
other_contacts = da_dict.pop("other_contacts", [])
|
other_contacts = da_dict.pop("other_contacts", [])
|
||||||
domain_info = cls(**da_dict)
|
domain_info = cls(**da_dict)
|
||||||
domain_info.domain_application = domain_application
|
domain_info.domain_application = domain_application
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue