From 30eed60413536a2ee579691652637c81c5f3a8fe Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Fri, 12 Apr 2024 15:34:01 -0600
Subject: [PATCH 01/31] Update help text (most the way there)
---
src/registrar/models/domain.py | 11 ++++-----
src/registrar/models/domain_information.py | 24 ++++---------------
src/registrar/models/domain_request.py | 27 +++++-----------------
src/registrar/models/host.py | 3 +--
src/registrar/models/host_ip.py | 3 +--
5 files changed, 18 insertions(+), 50 deletions(-)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index 079fce3bca..e4026be877 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -992,20 +992,19 @@ def __str__(self) -> str:
blank=False,
default=None, # prevent saving without a value
unique=True,
- help_text="Fully qualified domain name",
)
state = FSMField(
max_length=21,
choices=State.choices,
default=State.UNKNOWN,
- protected=True, # cannot change state directly, particularly in Django admin
- help_text="Very basic info about the lifecycle of this domain object",
+ # cannot change state directly, particularly in Django admin
+ protected=True,
)
expiration_date = DateField(
null=True,
- help_text=("Duplication of registry's expiration date saved for ease of reporting"),
+ help_text=("Date the domain expires in the registry"),
)
security_contact_registry_id = TextField(
@@ -1017,13 +1016,13 @@ def __str__(self) -> str:
deleted = DateField(
null=True,
editable=False,
- help_text="Deleted at date",
+ help_text="Will appear blank unless the domain is in \"deleted\" state",
)
first_ready = DateField(
null=True,
editable=False,
- help_text="The last time this domain moved into the READY state",
+ help_text="Date when this domain first moved into \"ready\" state; date will never change",
)
def isActive(self):
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index 2ed27504c5..103e5068ae 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -37,6 +37,7 @@ class DomainInformation(TimeStampedModel):
"registrar.User",
on_delete=models.PROTECT,
related_name="information_created",
+ help_text="Person who submitted the domain request",
)
domain_request = models.OneToOneField(
@@ -45,7 +46,7 @@ class DomainInformation(TimeStampedModel):
blank=True,
null=True,
related_name="DomainRequest_info",
- help_text="Associated domain request",
+ help_text="Request associated with this domain",
unique=True,
)
@@ -62,7 +63,6 @@ class DomainInformation(TimeStampedModel):
is_election_board = models.BooleanField(
null=True,
blank=True,
- help_text="Is your organization an election office?",
)
# TODO - Ticket #1911: stub this data from DomainRequest
@@ -76,25 +76,21 @@ class DomainInformation(TimeStampedModel):
federally_recognized_tribe = models.BooleanField(
null=True,
- help_text="Is the tribe federally recognized",
)
state_recognized_tribe = models.BooleanField(
null=True,
- help_text="Is the tribe recognized by a state",
)
tribe_name = models.CharField(
null=True,
blank=True,
- help_text="Name of tribe",
)
federal_agency = models.CharField(
choices=AGENCY_CHOICES,
null=True,
blank=True,
- help_text="Federal agency",
)
federal_type = models.CharField(
@@ -102,7 +98,6 @@ class DomainInformation(TimeStampedModel):
choices=BranchChoices.choices,
null=True,
blank=True,
- help_text="Federal government branch",
)
is_election_board = models.BooleanField(
@@ -114,52 +109,45 @@ class DomainInformation(TimeStampedModel):
organization_name = models.CharField(
null=True,
blank=True,
- help_text="Organization name",
db_index=True,
)
address_line1 = models.CharField(
null=True,
blank=True,
- help_text="Street address",
verbose_name="Street address",
)
address_line2 = models.CharField(
null=True,
blank=True,
- help_text="Street address line 2 (optional)",
verbose_name="Street address line 2 (optional)",
)
city = models.CharField(
null=True,
blank=True,
- help_text="City",
)
state_territory = models.CharField(
max_length=2,
choices=StateTerritoryChoices.choices,
null=True,
blank=True,
- help_text="State, territory, or military post",
verbose_name="State, territory, or military post",
)
zipcode = models.CharField(
max_length=10,
null=True,
blank=True,
- help_text="Zip code",
db_index=True,
)
urbanization = models.CharField(
null=True,
blank=True,
- help_text="Urbanization (required for Puerto Rico only)",
+ help_text="Required for Puerto Rico only",
verbose_name="Urbanization (required for Puerto Rico only)",
)
about_your_organization = models.TextField(
null=True,
blank=True,
- help_text="Information about your organization",
)
authorizing_official = models.ForeignKey(
@@ -177,7 +165,6 @@ class DomainInformation(TimeStampedModel):
null=True,
# Access this information via Domain as "domain.domain_info"
related_name="domain_info",
- help_text="Domain to which this information belongs",
)
# This is the contact information provided by the domain requestor. The
@@ -188,6 +175,7 @@ class DomainInformation(TimeStampedModel):
blank=True,
related_name="submitted_domain_requests_information",
on_delete=models.PROTECT,
+ help_text="Person listed under \"your contact information\" in the request form",
)
purpose = models.TextField(
@@ -206,13 +194,12 @@ class DomainInformation(TimeStampedModel):
no_other_contacts_rationale = models.TextField(
null=True,
blank=True,
- help_text="Reason for listing no additional contacts",
+ help_text="Required if creator does not list other employees",
)
anything_else = models.TextField(
null=True,
blank=True,
- help_text="Anything else?",
)
is_policy_acknowledged = models.BooleanField(
@@ -224,7 +211,6 @@ class DomainInformation(TimeStampedModel):
notes = models.TextField(
null=True,
blank=True,
- help_text="Notes about the request",
)
def __str__(self):
diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py
index bd529f7e66..1cd66b4641 100644
--- a/src/registrar/models/domain_request.py
+++ b/src/registrar/models/domain_request.py
@@ -455,6 +455,7 @@ class RejectionReasons(models.TextChoices):
"registrar.User",
on_delete=models.PROTECT,
related_name="domain_requests_created",
+ help_text="Person who submitted the domain request; will not receive email updates",
)
investigator = models.ForeignKey(
@@ -472,13 +473,11 @@ class RejectionReasons(models.TextChoices):
choices=OrganizationChoices.choices,
null=True,
blank=True,
- help_text="Type of organization",
)
is_election_board = models.BooleanField(
null=True,
blank=True,
- help_text="Is your organization an election office?",
)
# TODO - Ticket #1911: stub this data from DomainRequest
@@ -492,25 +491,21 @@ class RejectionReasons(models.TextChoices):
federally_recognized_tribe = models.BooleanField(
null=True,
- help_text="Is the tribe federally recognized",
)
state_recognized_tribe = models.BooleanField(
null=True,
- help_text="Is the tribe recognized by a state",
)
tribe_name = models.CharField(
null=True,
blank=True,
- help_text="Name of tribe",
)
federal_agency = models.CharField(
choices=AGENCY_CHOICES,
null=True,
blank=True,
- help_text="Federal agency",
)
federal_type = models.CharField(
@@ -518,57 +513,49 @@ class RejectionReasons(models.TextChoices):
choices=BranchChoices.choices,
null=True,
blank=True,
- help_text="Federal government branch",
)
organization_name = models.CharField(
null=True,
blank=True,
- help_text="Organization name",
db_index=True,
)
address_line1 = models.CharField(
null=True,
blank=True,
- help_text="Street address",
verbose_name="Address line 1",
)
address_line2 = models.CharField(
null=True,
blank=True,
- help_text="Street address line 2 (optional)",
verbose_name="Address line 2",
)
city = models.CharField(
null=True,
blank=True,
- help_text="City",
)
state_territory = models.CharField(
max_length=2,
choices=StateTerritoryChoices.choices,
null=True,
blank=True,
- help_text="State, territory, or military post",
)
zipcode = models.CharField(
max_length=10,
null=True,
blank=True,
- help_text="Zip code",
db_index=True,
)
urbanization = models.CharField(
null=True,
blank=True,
- help_text="Urbanization (required for Puerto Rico only)",
+ help_text="Required for Puetro Rico only",
)
about_your_organization = models.TextField(
null=True,
blank=True,
- help_text="Information about your organization",
)
authorizing_official = models.ForeignKey(
@@ -591,7 +578,7 @@ class RejectionReasons(models.TextChoices):
"Domain",
null=True,
blank=True,
- help_text="The approved domain",
+ help_text="Domain associated with this request; will be blank until request is approved",
related_name="domain_request",
on_delete=models.SET_NULL,
)
@@ -600,7 +587,6 @@ class RejectionReasons(models.TextChoices):
"DraftDomain",
null=True,
blank=True,
- help_text="The requested domain",
related_name="domain_request",
on_delete=models.PROTECT,
)
@@ -609,6 +595,7 @@ class RejectionReasons(models.TextChoices):
"registrar.Website",
blank=True,
related_name="alternatives+",
+ help_text="Other domain names the creator provided for consideration",
)
# This is the contact information provided by the domain requestor. The
@@ -619,12 +606,12 @@ class RejectionReasons(models.TextChoices):
blank=True,
related_name="submitted_domain_requests",
on_delete=models.PROTECT,
+ help_text="Person listed under \"your contact information\" in the request form; will receive email updates"
)
purpose = models.TextField(
null=True,
blank=True,
- help_text="Purpose of your domain",
)
other_contacts = models.ManyToManyField(
@@ -637,13 +624,12 @@ class RejectionReasons(models.TextChoices):
no_other_contacts_rationale = models.TextField(
null=True,
blank=True,
- help_text="Reason for listing no additional contacts",
+ help_text="Required if creator does not list other employees",
)
anything_else = models.TextField(
null=True,
blank=True,
- help_text="Anything else?",
)
is_policy_acknowledged = models.BooleanField(
@@ -663,7 +649,6 @@ class RejectionReasons(models.TextChoices):
notes = models.TextField(
null=True,
blank=True,
- help_text="Notes about this request",
)
def save(self, *args, **kwargs):
diff --git a/src/registrar/models/host.py b/src/registrar/models/host.py
index 3b966832f3..642027592d 100644
--- a/src/registrar/models/host.py
+++ b/src/registrar/models/host.py
@@ -21,14 +21,13 @@ class Host(TimeStampedModel):
blank=False,
default=None, # prevent saving without a value
unique=False,
- help_text="Fully qualified domain name",
)
domain = models.ForeignKey(
"registrar.Domain",
on_delete=models.PROTECT,
related_name="host", # access this Host via the Domain as `domain.host`
- help_text="Domain to which this host belongs",
+ help_text="Domain associated with this hosts",
)
def __str__(self):
diff --git a/src/registrar/models/host_ip.py b/src/registrar/models/host_ip.py
index 777d14430d..42d4892db8 100644
--- a/src/registrar/models/host_ip.py
+++ b/src/registrar/models/host_ip.py
@@ -20,12 +20,11 @@ class HostIP(TimeStampedModel):
blank=False,
default=None, # prevent saving without a value
validators=[validate_ipv46_address],
- help_text="IP address",
)
host = models.ForeignKey(
"registrar.Host",
on_delete=models.PROTECT,
related_name="ip", # access this HostIP via the Host as `host.ip`
- help_text="Host to which this IP address belongs",
+ help_text="IP associated with this host",
)
From 98dbca3983a1559a696d1792cdff7fa3a0489aeb Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 09:55:19 -0600
Subject: [PATCH 02/31] Add migration
---
...d_alter_domain_expiration_date_and_more.py | 1176 +++++++++++++++++
src/registrar/models/domain.py | 4 +-
src/registrar/models/domain_information.py | 2 +-
src/registrar/models/domain_request.py | 2 +-
src/registrar/models/host.py | 2 +-
src/registrar/models/user.py | 1 +
src/registrar/models/verified_by_staff.py | 3 +-
src/registrar/models/website.py | 2 +-
8 files changed, 1184 insertions(+), 8 deletions(-)
create mode 100644 src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
diff --git a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
new file mode 100644
index 0000000000..523fc522d8
--- /dev/null
+++ b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
@@ -0,0 +1,1176 @@
+# Generated by Django 4.2.10 on 2024-04-15 15:55
+
+from django.conf import settings
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+import django_fsm
+import registrar.models.utility.domain_field
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("registrar", "0084_create_groups_v11"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="domain",
+ name="deleted",
+ field=models.DateField(
+ editable=False, help_text='Will appear blank unless the domain is in "deleted" state', null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="expiration_date",
+ field=models.DateField(help_text="Date the domain expires in the registry", null=True),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="first_ready",
+ field=models.DateField(
+ editable=False,
+ help_text='Date when this domain first moved into "ready" state; date will never change',
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="name",
+ field=registrar.models.utility.domain_field.DomainField(default=None, max_length=253, unique=True),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="state",
+ field=django_fsm.FSMField(
+ choices=[
+ ("unknown", "Unknown"),
+ ("dns needed", "Dns needed"),
+ ("ready", "Ready"),
+ ("on hold", "On hold"),
+ ("deleted", "Deleted"),
+ ],
+ default="unknown",
+ max_length=21,
+ protected=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="about_your_organization",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="address_line1",
+ field=models.CharField(blank=True, null=True, verbose_name="Street address"),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="address_line2",
+ field=models.CharField(blank=True, null=True, verbose_name="Street address line 2 (optional)"),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="anything_else",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="city",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="creator",
+ field=models.ForeignKey(
+ help_text="Person who submitted the domain request",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="information_created",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="domain",
+ field=models.OneToOneField(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.CASCADE,
+ related_name="domain_info",
+ to="registrar.domain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="domain_request",
+ field=models.OneToOneField(
+ blank=True,
+ help_text="Request associated with this domain",
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="DomainRequest_info",
+ to="registrar.domainrequest",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="federal_agency",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ (
+ "Administrative Conference of the United States",
+ "Administrative Conference of the United States",
+ ),
+ ("Advisory Council on Historic Preservation", "Advisory Council on Historic Preservation"),
+ ("American Battle Monuments Commission", "American Battle Monuments Commission"),
+ ("AMTRAK", "AMTRAK"),
+ ("Appalachian Regional Commission", "Appalachian Regional Commission"),
+ (
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ ),
+ ("Appraisal Subcommittee", "Appraisal Subcommittee"),
+ ("Architect of the Capitol", "Architect of the Capitol"),
+ ("Armed Forces Retirement Home", "Armed Forces Retirement Home"),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ ),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ ),
+ ("Central Intelligence Agency", "Central Intelligence Agency"),
+ ("Chemical Safety Board", "Chemical Safety Board"),
+ ("Christopher Columbus Fellowship Foundation", "Christopher Columbus Fellowship Foundation"),
+ ("Civil Rights Cold Case Records Review Board", "Civil Rights Cold Case Records Review Board"),
+ (
+ "Commission for the Preservation of America's Heritage Abroad",
+ "Commission for the Preservation of America's Heritage Abroad",
+ ),
+ ("Commission of Fine Arts", "Commission of Fine Arts"),
+ (
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ ),
+ ("Commodity Futures Trading Commission", "Commodity Futures Trading Commission"),
+ ("Congressional Budget Office", "Congressional Budget Office"),
+ ("Consumer Financial Protection Bureau", "Consumer Financial Protection Bureau"),
+ ("Consumer Product Safety Commission", "Consumer Product Safety Commission"),
+ ("Corporation for National & Community Service", "Corporation for National & Community Service"),
+ (
+ "Corporation for National and Community Service",
+ "Corporation for National and Community Service",
+ ),
+ (
+ "Council of Inspectors General on Integrity and Efficiency",
+ "Council of Inspectors General on Integrity and Efficiency",
+ ),
+ ("Court Services and Offender Supervision", "Court Services and Offender Supervision"),
+ ("Cyberspace Solarium Commission", "Cyberspace Solarium Commission"),
+ (
+ "DC Court Services and Offender Supervision Agency",
+ "DC Court Services and Offender Supervision Agency",
+ ),
+ ("DC Pre-trial Services", "DC Pre-trial Services"),
+ ("Defense Nuclear Facilities Safety Board", "Defense Nuclear Facilities Safety Board"),
+ ("Delta Regional Authority", "Delta Regional Authority"),
+ ("Denali Commission", "Denali Commission"),
+ ("Department of Agriculture", "Department of Agriculture"),
+ ("Department of Commerce", "Department of Commerce"),
+ ("Department of Defense", "Department of Defense"),
+ ("Department of Education", "Department of Education"),
+ ("Department of Energy", "Department of Energy"),
+ ("Department of Health and Human Services", "Department of Health and Human Services"),
+ ("Department of Homeland Security", "Department of Homeland Security"),
+ ("Department of Housing and Urban Development", "Department of Housing and Urban Development"),
+ ("Department of Justice", "Department of Justice"),
+ ("Department of Labor", "Department of Labor"),
+ ("Department of State", "Department of State"),
+ ("Department of the Interior", "Department of the Interior"),
+ ("Department of the Treasury", "Department of the Treasury"),
+ ("Department of Transportation", "Department of Transportation"),
+ ("Department of Veterans Affairs", "Department of Veterans Affairs"),
+ ("Director of National Intelligence", "Director of National Intelligence"),
+ ("Dwight D. Eisenhower Memorial Commission", "Dwight D. Eisenhower Memorial Commission"),
+ ("Election Assistance Commission", "Election Assistance Commission"),
+ ("Environmental Protection Agency", "Environmental Protection Agency"),
+ ("Equal Employment Opportunity Commission", "Equal Employment Opportunity Commission"),
+ ("Executive Office of the President", "Executive Office of the President"),
+ ("Export-Import Bank of the United States", "Export-Import Bank of the United States"),
+ ("Export/Import Bank of the U.S.", "Export/Import Bank of the U.S."),
+ ("Farm Credit Administration", "Farm Credit Administration"),
+ ("Farm Credit System Insurance Corporation", "Farm Credit System Insurance Corporation"),
+ ("Federal Communications Commission", "Federal Communications Commission"),
+ ("Federal Deposit Insurance Corporation", "Federal Deposit Insurance Corporation"),
+ ("Federal Election Commission", "Federal Election Commission"),
+ ("Federal Energy Regulatory Commission", "Federal Energy Regulatory Commission"),
+ (
+ "Federal Financial Institutions Examination Council",
+ "Federal Financial Institutions Examination Council",
+ ),
+ ("Federal Housing Finance Agency", "Federal Housing Finance Agency"),
+ ("Federal Judiciary", "Federal Judiciary"),
+ ("Federal Labor Relations Authority", "Federal Labor Relations Authority"),
+ ("Federal Maritime Commission", "Federal Maritime Commission"),
+ ("Federal Mediation and Conciliation Service", "Federal Mediation and Conciliation Service"),
+ (
+ "Federal Mine Safety and Health Review Commission",
+ "Federal Mine Safety and Health Review Commission",
+ ),
+ (
+ "Federal Permitting Improvement Steering Council",
+ "Federal Permitting Improvement Steering Council",
+ ),
+ ("Federal Reserve Board of Governors", "Federal Reserve Board of Governors"),
+ ("Federal Reserve System", "Federal Reserve System"),
+ ("Federal Trade Commission", "Federal Trade Commission"),
+ ("General Services Administration", "General Services Administration"),
+ ("gov Administration", "gov Administration"),
+ ("Government Accountability Office", "Government Accountability Office"),
+ ("Government Publishing Office", "Government Publishing Office"),
+ ("Gulf Coast Ecosystem Restoration Council", "Gulf Coast Ecosystem Restoration Council"),
+ ("Harry S Truman Scholarship Foundation", "Harry S Truman Scholarship Foundation"),
+ ("Harry S. Truman Scholarship Foundation", "Harry S. Truman Scholarship Foundation"),
+ ("Institute of Museum and Library Services", "Institute of Museum and Library Services"),
+ ("Institute of Peace", "Institute of Peace"),
+ ("Inter-American Foundation", "Inter-American Foundation"),
+ (
+ "International Boundary and Water Commission: United States and Mexico",
+ "International Boundary and Water Commission: United States and Mexico",
+ ),
+ (
+ "International Boundary Commission: United States and Canada",
+ "International Boundary Commission: United States and Canada",
+ ),
+ (
+ "International Joint Commission: United States and Canada",
+ "International Joint Commission: United States and Canada",
+ ),
+ ("James Madison Memorial Fellowship Foundation", "James Madison Memorial Fellowship Foundation"),
+ ("Japan-United States Friendship Commission", "Japan-United States Friendship Commission"),
+ ("Japan-US Friendship Commission", "Japan-US Friendship Commission"),
+ ("John F. Kennedy Center for Performing Arts", "John F. Kennedy Center for Performing Arts"),
+ (
+ "John F. Kennedy Center for the Performing Arts",
+ "John F. Kennedy Center for the Performing Arts",
+ ),
+ ("Legal Services Corporation", "Legal Services Corporation"),
+ ("Legislative Branch", "Legislative Branch"),
+ ("Library of Congress", "Library of Congress"),
+ ("Marine Mammal Commission", "Marine Mammal Commission"),
+ (
+ "Medicaid and CHIP Payment and Access Commission",
+ "Medicaid and CHIP Payment and Access Commission",
+ ),
+ ("Medical Payment Advisory Commission", "Medical Payment Advisory Commission"),
+ ("Medicare Payment Advisory Commission", "Medicare Payment Advisory Commission"),
+ ("Merit Systems Protection Board", "Merit Systems Protection Board"),
+ ("Millennium Challenge Corporation", "Millennium Challenge Corporation"),
+ (
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ ),
+ ("National Aeronautics and Space Administration", "National Aeronautics and Space Administration"),
+ ("National Archives and Records Administration", "National Archives and Records Administration"),
+ ("National Capital Planning Commission", "National Capital Planning Commission"),
+ ("National Council on Disability", "National Council on Disability"),
+ ("National Credit Union Administration", "National Credit Union Administration"),
+ ("National Endowment for the Arts", "National Endowment for the Arts"),
+ ("National Endowment for the Humanities", "National Endowment for the Humanities"),
+ (
+ "National Foundation on the Arts and the Humanities",
+ "National Foundation on the Arts and the Humanities",
+ ),
+ ("National Gallery of Art", "National Gallery of Art"),
+ ("National Indian Gaming Commission", "National Indian Gaming Commission"),
+ ("National Labor Relations Board", "National Labor Relations Board"),
+ ("National Mediation Board", "National Mediation Board"),
+ ("National Science Foundation", "National Science Foundation"),
+ (
+ "National Security Commission on Artificial Intelligence",
+ "National Security Commission on Artificial Intelligence",
+ ),
+ ("National Transportation Safety Board", "National Transportation Safety Board"),
+ (
+ "Networking Information Technology Research and Development",
+ "Networking Information Technology Research and Development",
+ ),
+ ("Non-Federal Agency", "Non-Federal Agency"),
+ ("Northern Border Regional Commission", "Northern Border Regional Commission"),
+ ("Nuclear Regulatory Commission", "Nuclear Regulatory Commission"),
+ ("Nuclear Safety Oversight Committee", "Nuclear Safety Oversight Committee"),
+ ("Nuclear Waste Technical Review Board", "Nuclear Waste Technical Review Board"),
+ (
+ "Occupational Safety & Health Review Commission",
+ "Occupational Safety & Health Review Commission",
+ ),
+ (
+ "Occupational Safety and Health Review Commission",
+ "Occupational Safety and Health Review Commission",
+ ),
+ ("Office of Compliance", "Office of Compliance"),
+ ("Office of Congressional Workplace Rights", "Office of Congressional Workplace Rights"),
+ ("Office of Government Ethics", "Office of Government Ethics"),
+ ("Office of Navajo and Hopi Indian Relocation", "Office of Navajo and Hopi Indian Relocation"),
+ ("Office of Personnel Management", "Office of Personnel Management"),
+ ("Open World Leadership Center", "Open World Leadership Center"),
+ ("Overseas Private Investment Corporation", "Overseas Private Investment Corporation"),
+ ("Peace Corps", "Peace Corps"),
+ ("Pension Benefit Guaranty Corporation", "Pension Benefit Guaranty Corporation"),
+ ("Postal Regulatory Commission", "Postal Regulatory Commission"),
+ ("Presidio Trust", "Presidio Trust"),
+ ("Privacy and Civil Liberties Oversight Board", "Privacy and Civil Liberties Oversight Board"),
+ ("Public Buildings Reform Board", "Public Buildings Reform Board"),
+ (
+ "Public Defender Service for the District of Columbia",
+ "Public Defender Service for the District of Columbia",
+ ),
+ ("Railroad Retirement Board", "Railroad Retirement Board"),
+ ("Securities and Exchange Commission", "Securities and Exchange Commission"),
+ ("Selective Service System", "Selective Service System"),
+ ("Small Business Administration", "Small Business Administration"),
+ ("Smithsonian Institution", "Smithsonian Institution"),
+ ("Social Security Administration", "Social Security Administration"),
+ ("Social Security Advisory Board", "Social Security Advisory Board"),
+ ("Southeast Crescent Regional Commission", "Southeast Crescent Regional Commission"),
+ ("Southwest Border Regional Commission", "Southwest Border Regional Commission"),
+ ("State Justice Institute", "State Justice Institute"),
+ ("State, Local, and Tribal Government", "State, Local, and Tribal Government"),
+ ("Stennis Center for Public Service", "Stennis Center for Public Service"),
+ ("Surface Transportation Board", "Surface Transportation Board"),
+ ("Tennessee Valley Authority", "Tennessee Valley Authority"),
+ ("The Executive Office of the President", "The Executive Office of the President"),
+ ("The Intelligence Community", "The Intelligence Community"),
+ ("The Legislative Branch", "The Legislative Branch"),
+ ("The Supreme Court", "The Supreme Court"),
+ (
+ "The United States World War One Centennial Commission",
+ "The United States World War One Centennial Commission",
+ ),
+ ("U.S. Access Board", "U.S. Access Board"),
+ ("U.S. Agency for Global Media", "U.S. Agency for Global Media"),
+ ("U.S. Agency for International Development", "U.S. Agency for International Development"),
+ ("U.S. Capitol Police", "U.S. Capitol Police"),
+ ("U.S. Chemical Safety Board", "U.S. Chemical Safety Board"),
+ (
+ "U.S. China Economic and Security Review Commission",
+ "U.S. China Economic and Security Review Commission",
+ ),
+ (
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ ),
+ ("U.S. Commission of Fine Arts", "U.S. Commission of Fine Arts"),
+ ("U.S. Commission on Civil Rights", "U.S. Commission on Civil Rights"),
+ (
+ "U.S. Commission on International Religious Freedom",
+ "U.S. Commission on International Religious Freedom",
+ ),
+ ("U.S. Courts", "U.S. Courts"),
+ ("U.S. Department of Agriculture", "U.S. Department of Agriculture"),
+ ("U.S. Interagency Council on Homelessness", "U.S. Interagency Council on Homelessness"),
+ ("U.S. International Trade Commission", "U.S. International Trade Commission"),
+ ("U.S. Nuclear Waste Technical Review Board", "U.S. Nuclear Waste Technical Review Board"),
+ ("U.S. Office of Special Counsel", "U.S. Office of Special Counsel"),
+ ("U.S. Peace Corps", "U.S. Peace Corps"),
+ ("U.S. Postal Service", "U.S. Postal Service"),
+ ("U.S. Semiquincentennial Commission", "U.S. Semiquincentennial Commission"),
+ ("U.S. Trade and Development Agency", "U.S. Trade and Development Agency"),
+ (
+ "U.S.-China Economic and Security Review Commission",
+ "U.S.-China Economic and Security Review Commission",
+ ),
+ ("Udall Foundation", "Udall Foundation"),
+ ("United States AbilityOne", "United States AbilityOne"),
+ ("United States Access Board", "United States Access Board"),
+ ("United States African Development Foundation", "United States African Development Foundation"),
+ ("United States Agency for Global Media", "United States Agency for Global Media"),
+ ("United States Arctic Research Commission", "United States Arctic Research Commission"),
+ ("United States Global Change Research Program", "United States Global Change Research Program"),
+ ("United States Holocaust Memorial Museum", "United States Holocaust Memorial Museum"),
+ ("United States Institute of Peace", "United States Institute of Peace"),
+ (
+ "United States Interagency Council on Homelessness",
+ "United States Interagency Council on Homelessness",
+ ),
+ (
+ "United States International Development Finance Corporation",
+ "United States International Development Finance Corporation",
+ ),
+ ("United States International Trade Commission", "United States International Trade Commission"),
+ ("United States Postal Service", "United States Postal Service"),
+ ("United States Senate", "United States Senate"),
+ ("United States Trade and Development Agency", "United States Trade and Development Agency"),
+ (
+ "Utah Reclamation Mitigation and Conservation Commission",
+ "Utah Reclamation Mitigation and Conservation Commission",
+ ),
+ ("Vietnam Education Foundation", "Vietnam Education Foundation"),
+ ("Western Hemisphere Drug Policy Commission", "Western Hemisphere Drug Policy Commission"),
+ (
+ "Woodrow Wilson International Center for Scholars",
+ "Woodrow Wilson International Center for Scholars",
+ ),
+ ("World War I Centennial Commission", "World War I Centennial Commission"),
+ ],
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="federal_type",
+ field=models.CharField(
+ blank=True,
+ choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
+ max_length=50,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="federally_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="no_other_contacts_rationale",
+ field=models.TextField(
+ blank=True, help_text="Required if creator does not list other employees", null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="notes",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="organization_name",
+ field=models.CharField(blank=True, db_index=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="state_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="state_territory",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("AL", "Alabama (AL)"),
+ ("AK", "Alaska (AK)"),
+ ("AS", "American Samoa (AS)"),
+ ("AZ", "Arizona (AZ)"),
+ ("AR", "Arkansas (AR)"),
+ ("CA", "California (CA)"),
+ ("CO", "Colorado (CO)"),
+ ("CT", "Connecticut (CT)"),
+ ("DE", "Delaware (DE)"),
+ ("DC", "District of Columbia (DC)"),
+ ("FL", "Florida (FL)"),
+ ("GA", "Georgia (GA)"),
+ ("GU", "Guam (GU)"),
+ ("HI", "Hawaii (HI)"),
+ ("ID", "Idaho (ID)"),
+ ("IL", "Illinois (IL)"),
+ ("IN", "Indiana (IN)"),
+ ("IA", "Iowa (IA)"),
+ ("KS", "Kansas (KS)"),
+ ("KY", "Kentucky (KY)"),
+ ("LA", "Louisiana (LA)"),
+ ("ME", "Maine (ME)"),
+ ("MD", "Maryland (MD)"),
+ ("MA", "Massachusetts (MA)"),
+ ("MI", "Michigan (MI)"),
+ ("MN", "Minnesota (MN)"),
+ ("MS", "Mississippi (MS)"),
+ ("MO", "Missouri (MO)"),
+ ("MT", "Montana (MT)"),
+ ("NE", "Nebraska (NE)"),
+ ("NV", "Nevada (NV)"),
+ ("NH", "New Hampshire (NH)"),
+ ("NJ", "New Jersey (NJ)"),
+ ("NM", "New Mexico (NM)"),
+ ("NY", "New York (NY)"),
+ ("NC", "North Carolina (NC)"),
+ ("ND", "North Dakota (ND)"),
+ ("MP", "Northern Mariana Islands (MP)"),
+ ("OH", "Ohio (OH)"),
+ ("OK", "Oklahoma (OK)"),
+ ("OR", "Oregon (OR)"),
+ ("PA", "Pennsylvania (PA)"),
+ ("PR", "Puerto Rico (PR)"),
+ ("RI", "Rhode Island (RI)"),
+ ("SC", "South Carolina (SC)"),
+ ("SD", "South Dakota (SD)"),
+ ("TN", "Tennessee (TN)"),
+ ("TX", "Texas (TX)"),
+ ("UM", "United States Minor Outlying Islands (UM)"),
+ ("UT", "Utah (UT)"),
+ ("VT", "Vermont (VT)"),
+ ("VI", "Virgin Islands (VI)"),
+ ("VA", "Virginia (VA)"),
+ ("WA", "Washington (WA)"),
+ ("WV", "West Virginia (WV)"),
+ ("WI", "Wisconsin (WI)"),
+ ("WY", "Wyoming (WY)"),
+ ("AA", "Armed Forces Americas (AA)"),
+ ("AE", "Armed Forces Africa, Canada, Europe, Middle East (AE)"),
+ ("AP", "Armed Forces Pacific (AP)"),
+ ],
+ max_length=2,
+ null=True,
+ verbose_name="State, territory, or military post",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="submitter",
+ field=models.ForeignKey(
+ blank=True,
+ help_text='Person listed under "your contact information" in the request form',
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="submitted_domain_requests_information",
+ to="registrar.contact",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="tribe_name",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="urbanization",
+ field=models.CharField(
+ blank=True,
+ help_text="Required for Puerto Rico only",
+ null=True,
+ verbose_name="Urbanization (required for Puerto Rico only)",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="zipcode",
+ field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="about_your_organization",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="address_line1",
+ field=models.CharField(blank=True, null=True, verbose_name="Address line 1"),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="address_line2",
+ field=models.CharField(blank=True, null=True, verbose_name="Address line 2"),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="alternative_domains",
+ field=models.ManyToManyField(
+ blank=True,
+ help_text="Other domain names the creator provided for consideration",
+ related_name="alternatives+",
+ to="registrar.website",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="anything_else",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="approved_domain",
+ field=models.OneToOneField(
+ blank=True,
+ help_text="Domain associated with this request; will be blank until request is approved",
+ null=True,
+ on_delete=django.db.models.deletion.SET_NULL,
+ related_name="domain_request",
+ to="registrar.domain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="city",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="creator",
+ field=models.ForeignKey(
+ help_text="Person who submitted the domain request; will not receive email updates",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="domain_requests_created",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="federal_agency",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ (
+ "Administrative Conference of the United States",
+ "Administrative Conference of the United States",
+ ),
+ ("Advisory Council on Historic Preservation", "Advisory Council on Historic Preservation"),
+ ("American Battle Monuments Commission", "American Battle Monuments Commission"),
+ ("AMTRAK", "AMTRAK"),
+ ("Appalachian Regional Commission", "Appalachian Regional Commission"),
+ (
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ ),
+ ("Appraisal Subcommittee", "Appraisal Subcommittee"),
+ ("Architect of the Capitol", "Architect of the Capitol"),
+ ("Armed Forces Retirement Home", "Armed Forces Retirement Home"),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ ),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ ),
+ ("Central Intelligence Agency", "Central Intelligence Agency"),
+ ("Chemical Safety Board", "Chemical Safety Board"),
+ ("Christopher Columbus Fellowship Foundation", "Christopher Columbus Fellowship Foundation"),
+ ("Civil Rights Cold Case Records Review Board", "Civil Rights Cold Case Records Review Board"),
+ (
+ "Commission for the Preservation of America's Heritage Abroad",
+ "Commission for the Preservation of America's Heritage Abroad",
+ ),
+ ("Commission of Fine Arts", "Commission of Fine Arts"),
+ (
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ ),
+ ("Commodity Futures Trading Commission", "Commodity Futures Trading Commission"),
+ ("Congressional Budget Office", "Congressional Budget Office"),
+ ("Consumer Financial Protection Bureau", "Consumer Financial Protection Bureau"),
+ ("Consumer Product Safety Commission", "Consumer Product Safety Commission"),
+ ("Corporation for National & Community Service", "Corporation for National & Community Service"),
+ (
+ "Corporation for National and Community Service",
+ "Corporation for National and Community Service",
+ ),
+ (
+ "Council of Inspectors General on Integrity and Efficiency",
+ "Council of Inspectors General on Integrity and Efficiency",
+ ),
+ ("Court Services and Offender Supervision", "Court Services and Offender Supervision"),
+ ("Cyberspace Solarium Commission", "Cyberspace Solarium Commission"),
+ (
+ "DC Court Services and Offender Supervision Agency",
+ "DC Court Services and Offender Supervision Agency",
+ ),
+ ("DC Pre-trial Services", "DC Pre-trial Services"),
+ ("Defense Nuclear Facilities Safety Board", "Defense Nuclear Facilities Safety Board"),
+ ("Delta Regional Authority", "Delta Regional Authority"),
+ ("Denali Commission", "Denali Commission"),
+ ("Department of Agriculture", "Department of Agriculture"),
+ ("Department of Commerce", "Department of Commerce"),
+ ("Department of Defense", "Department of Defense"),
+ ("Department of Education", "Department of Education"),
+ ("Department of Energy", "Department of Energy"),
+ ("Department of Health and Human Services", "Department of Health and Human Services"),
+ ("Department of Homeland Security", "Department of Homeland Security"),
+ ("Department of Housing and Urban Development", "Department of Housing and Urban Development"),
+ ("Department of Justice", "Department of Justice"),
+ ("Department of Labor", "Department of Labor"),
+ ("Department of State", "Department of State"),
+ ("Department of the Interior", "Department of the Interior"),
+ ("Department of the Treasury", "Department of the Treasury"),
+ ("Department of Transportation", "Department of Transportation"),
+ ("Department of Veterans Affairs", "Department of Veterans Affairs"),
+ ("Director of National Intelligence", "Director of National Intelligence"),
+ ("Dwight D. Eisenhower Memorial Commission", "Dwight D. Eisenhower Memorial Commission"),
+ ("Election Assistance Commission", "Election Assistance Commission"),
+ ("Environmental Protection Agency", "Environmental Protection Agency"),
+ ("Equal Employment Opportunity Commission", "Equal Employment Opportunity Commission"),
+ ("Executive Office of the President", "Executive Office of the President"),
+ ("Export-Import Bank of the United States", "Export-Import Bank of the United States"),
+ ("Export/Import Bank of the U.S.", "Export/Import Bank of the U.S."),
+ ("Farm Credit Administration", "Farm Credit Administration"),
+ ("Farm Credit System Insurance Corporation", "Farm Credit System Insurance Corporation"),
+ ("Federal Communications Commission", "Federal Communications Commission"),
+ ("Federal Deposit Insurance Corporation", "Federal Deposit Insurance Corporation"),
+ ("Federal Election Commission", "Federal Election Commission"),
+ ("Federal Energy Regulatory Commission", "Federal Energy Regulatory Commission"),
+ (
+ "Federal Financial Institutions Examination Council",
+ "Federal Financial Institutions Examination Council",
+ ),
+ ("Federal Housing Finance Agency", "Federal Housing Finance Agency"),
+ ("Federal Judiciary", "Federal Judiciary"),
+ ("Federal Labor Relations Authority", "Federal Labor Relations Authority"),
+ ("Federal Maritime Commission", "Federal Maritime Commission"),
+ ("Federal Mediation and Conciliation Service", "Federal Mediation and Conciliation Service"),
+ (
+ "Federal Mine Safety and Health Review Commission",
+ "Federal Mine Safety and Health Review Commission",
+ ),
+ (
+ "Federal Permitting Improvement Steering Council",
+ "Federal Permitting Improvement Steering Council",
+ ),
+ ("Federal Reserve Board of Governors", "Federal Reserve Board of Governors"),
+ ("Federal Reserve System", "Federal Reserve System"),
+ ("Federal Trade Commission", "Federal Trade Commission"),
+ ("General Services Administration", "General Services Administration"),
+ ("gov Administration", "gov Administration"),
+ ("Government Accountability Office", "Government Accountability Office"),
+ ("Government Publishing Office", "Government Publishing Office"),
+ ("Gulf Coast Ecosystem Restoration Council", "Gulf Coast Ecosystem Restoration Council"),
+ ("Harry S Truman Scholarship Foundation", "Harry S Truman Scholarship Foundation"),
+ ("Harry S. Truman Scholarship Foundation", "Harry S. Truman Scholarship Foundation"),
+ ("Institute of Museum and Library Services", "Institute of Museum and Library Services"),
+ ("Institute of Peace", "Institute of Peace"),
+ ("Inter-American Foundation", "Inter-American Foundation"),
+ (
+ "International Boundary and Water Commission: United States and Mexico",
+ "International Boundary and Water Commission: United States and Mexico",
+ ),
+ (
+ "International Boundary Commission: United States and Canada",
+ "International Boundary Commission: United States and Canada",
+ ),
+ (
+ "International Joint Commission: United States and Canada",
+ "International Joint Commission: United States and Canada",
+ ),
+ ("James Madison Memorial Fellowship Foundation", "James Madison Memorial Fellowship Foundation"),
+ ("Japan-United States Friendship Commission", "Japan-United States Friendship Commission"),
+ ("Japan-US Friendship Commission", "Japan-US Friendship Commission"),
+ ("John F. Kennedy Center for Performing Arts", "John F. Kennedy Center for Performing Arts"),
+ (
+ "John F. Kennedy Center for the Performing Arts",
+ "John F. Kennedy Center for the Performing Arts",
+ ),
+ ("Legal Services Corporation", "Legal Services Corporation"),
+ ("Legislative Branch", "Legislative Branch"),
+ ("Library of Congress", "Library of Congress"),
+ ("Marine Mammal Commission", "Marine Mammal Commission"),
+ (
+ "Medicaid and CHIP Payment and Access Commission",
+ "Medicaid and CHIP Payment and Access Commission",
+ ),
+ ("Medical Payment Advisory Commission", "Medical Payment Advisory Commission"),
+ ("Medicare Payment Advisory Commission", "Medicare Payment Advisory Commission"),
+ ("Merit Systems Protection Board", "Merit Systems Protection Board"),
+ ("Millennium Challenge Corporation", "Millennium Challenge Corporation"),
+ (
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ ),
+ ("National Aeronautics and Space Administration", "National Aeronautics and Space Administration"),
+ ("National Archives and Records Administration", "National Archives and Records Administration"),
+ ("National Capital Planning Commission", "National Capital Planning Commission"),
+ ("National Council on Disability", "National Council on Disability"),
+ ("National Credit Union Administration", "National Credit Union Administration"),
+ ("National Endowment for the Arts", "National Endowment for the Arts"),
+ ("National Endowment for the Humanities", "National Endowment for the Humanities"),
+ (
+ "National Foundation on the Arts and the Humanities",
+ "National Foundation on the Arts and the Humanities",
+ ),
+ ("National Gallery of Art", "National Gallery of Art"),
+ ("National Indian Gaming Commission", "National Indian Gaming Commission"),
+ ("National Labor Relations Board", "National Labor Relations Board"),
+ ("National Mediation Board", "National Mediation Board"),
+ ("National Science Foundation", "National Science Foundation"),
+ (
+ "National Security Commission on Artificial Intelligence",
+ "National Security Commission on Artificial Intelligence",
+ ),
+ ("National Transportation Safety Board", "National Transportation Safety Board"),
+ (
+ "Networking Information Technology Research and Development",
+ "Networking Information Technology Research and Development",
+ ),
+ ("Non-Federal Agency", "Non-Federal Agency"),
+ ("Northern Border Regional Commission", "Northern Border Regional Commission"),
+ ("Nuclear Regulatory Commission", "Nuclear Regulatory Commission"),
+ ("Nuclear Safety Oversight Committee", "Nuclear Safety Oversight Committee"),
+ ("Nuclear Waste Technical Review Board", "Nuclear Waste Technical Review Board"),
+ (
+ "Occupational Safety & Health Review Commission",
+ "Occupational Safety & Health Review Commission",
+ ),
+ (
+ "Occupational Safety and Health Review Commission",
+ "Occupational Safety and Health Review Commission",
+ ),
+ ("Office of Compliance", "Office of Compliance"),
+ ("Office of Congressional Workplace Rights", "Office of Congressional Workplace Rights"),
+ ("Office of Government Ethics", "Office of Government Ethics"),
+ ("Office of Navajo and Hopi Indian Relocation", "Office of Navajo and Hopi Indian Relocation"),
+ ("Office of Personnel Management", "Office of Personnel Management"),
+ ("Open World Leadership Center", "Open World Leadership Center"),
+ ("Overseas Private Investment Corporation", "Overseas Private Investment Corporation"),
+ ("Peace Corps", "Peace Corps"),
+ ("Pension Benefit Guaranty Corporation", "Pension Benefit Guaranty Corporation"),
+ ("Postal Regulatory Commission", "Postal Regulatory Commission"),
+ ("Presidio Trust", "Presidio Trust"),
+ ("Privacy and Civil Liberties Oversight Board", "Privacy and Civil Liberties Oversight Board"),
+ ("Public Buildings Reform Board", "Public Buildings Reform Board"),
+ (
+ "Public Defender Service for the District of Columbia",
+ "Public Defender Service for the District of Columbia",
+ ),
+ ("Railroad Retirement Board", "Railroad Retirement Board"),
+ ("Securities and Exchange Commission", "Securities and Exchange Commission"),
+ ("Selective Service System", "Selective Service System"),
+ ("Small Business Administration", "Small Business Administration"),
+ ("Smithsonian Institution", "Smithsonian Institution"),
+ ("Social Security Administration", "Social Security Administration"),
+ ("Social Security Advisory Board", "Social Security Advisory Board"),
+ ("Southeast Crescent Regional Commission", "Southeast Crescent Regional Commission"),
+ ("Southwest Border Regional Commission", "Southwest Border Regional Commission"),
+ ("State Justice Institute", "State Justice Institute"),
+ ("State, Local, and Tribal Government", "State, Local, and Tribal Government"),
+ ("Stennis Center for Public Service", "Stennis Center for Public Service"),
+ ("Surface Transportation Board", "Surface Transportation Board"),
+ ("Tennessee Valley Authority", "Tennessee Valley Authority"),
+ ("The Executive Office of the President", "The Executive Office of the President"),
+ ("The Intelligence Community", "The Intelligence Community"),
+ ("The Legislative Branch", "The Legislative Branch"),
+ ("The Supreme Court", "The Supreme Court"),
+ (
+ "The United States World War One Centennial Commission",
+ "The United States World War One Centennial Commission",
+ ),
+ ("U.S. Access Board", "U.S. Access Board"),
+ ("U.S. Agency for Global Media", "U.S. Agency for Global Media"),
+ ("U.S. Agency for International Development", "U.S. Agency for International Development"),
+ ("U.S. Capitol Police", "U.S. Capitol Police"),
+ ("U.S. Chemical Safety Board", "U.S. Chemical Safety Board"),
+ (
+ "U.S. China Economic and Security Review Commission",
+ "U.S. China Economic and Security Review Commission",
+ ),
+ (
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ ),
+ ("U.S. Commission of Fine Arts", "U.S. Commission of Fine Arts"),
+ ("U.S. Commission on Civil Rights", "U.S. Commission on Civil Rights"),
+ (
+ "U.S. Commission on International Religious Freedom",
+ "U.S. Commission on International Religious Freedom",
+ ),
+ ("U.S. Courts", "U.S. Courts"),
+ ("U.S. Department of Agriculture", "U.S. Department of Agriculture"),
+ ("U.S. Interagency Council on Homelessness", "U.S. Interagency Council on Homelessness"),
+ ("U.S. International Trade Commission", "U.S. International Trade Commission"),
+ ("U.S. Nuclear Waste Technical Review Board", "U.S. Nuclear Waste Technical Review Board"),
+ ("U.S. Office of Special Counsel", "U.S. Office of Special Counsel"),
+ ("U.S. Peace Corps", "U.S. Peace Corps"),
+ ("U.S. Postal Service", "U.S. Postal Service"),
+ ("U.S. Semiquincentennial Commission", "U.S. Semiquincentennial Commission"),
+ ("U.S. Trade and Development Agency", "U.S. Trade and Development Agency"),
+ (
+ "U.S.-China Economic and Security Review Commission",
+ "U.S.-China Economic and Security Review Commission",
+ ),
+ ("Udall Foundation", "Udall Foundation"),
+ ("United States AbilityOne", "United States AbilityOne"),
+ ("United States Access Board", "United States Access Board"),
+ ("United States African Development Foundation", "United States African Development Foundation"),
+ ("United States Agency for Global Media", "United States Agency for Global Media"),
+ ("United States Arctic Research Commission", "United States Arctic Research Commission"),
+ ("United States Global Change Research Program", "United States Global Change Research Program"),
+ ("United States Holocaust Memorial Museum", "United States Holocaust Memorial Museum"),
+ ("United States Institute of Peace", "United States Institute of Peace"),
+ (
+ "United States Interagency Council on Homelessness",
+ "United States Interagency Council on Homelessness",
+ ),
+ (
+ "United States International Development Finance Corporation",
+ "United States International Development Finance Corporation",
+ ),
+ ("United States International Trade Commission", "United States International Trade Commission"),
+ ("United States Postal Service", "United States Postal Service"),
+ ("United States Senate", "United States Senate"),
+ ("United States Trade and Development Agency", "United States Trade and Development Agency"),
+ (
+ "Utah Reclamation Mitigation and Conservation Commission",
+ "Utah Reclamation Mitigation and Conservation Commission",
+ ),
+ ("Vietnam Education Foundation", "Vietnam Education Foundation"),
+ ("Western Hemisphere Drug Policy Commission", "Western Hemisphere Drug Policy Commission"),
+ (
+ "Woodrow Wilson International Center for Scholars",
+ "Woodrow Wilson International Center for Scholars",
+ ),
+ ("World War I Centennial Commission", "World War I Centennial Commission"),
+ ],
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="federal_type",
+ field=models.CharField(
+ blank=True,
+ choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
+ max_length=50,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="federally_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="generic_org_type",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("federal", "Federal"),
+ ("interstate", "Interstate"),
+ ("state_or_territory", "State or territory"),
+ ("tribal", "Tribal"),
+ ("county", "County"),
+ ("city", "City"),
+ ("special_district", "Special district"),
+ ("school_district", "School district"),
+ ],
+ max_length=255,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="is_election_board",
+ field=models.BooleanField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="no_other_contacts_rationale",
+ field=models.TextField(
+ blank=True, help_text="Required if creator does not list other employees", null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="notes",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="organization_name",
+ field=models.CharField(blank=True, db_index=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="purpose",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="requested_domain",
+ field=models.OneToOneField(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="domain_request",
+ to="registrar.draftdomain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="state_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="state_territory",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("AL", "Alabama (AL)"),
+ ("AK", "Alaska (AK)"),
+ ("AS", "American Samoa (AS)"),
+ ("AZ", "Arizona (AZ)"),
+ ("AR", "Arkansas (AR)"),
+ ("CA", "California (CA)"),
+ ("CO", "Colorado (CO)"),
+ ("CT", "Connecticut (CT)"),
+ ("DE", "Delaware (DE)"),
+ ("DC", "District of Columbia (DC)"),
+ ("FL", "Florida (FL)"),
+ ("GA", "Georgia (GA)"),
+ ("GU", "Guam (GU)"),
+ ("HI", "Hawaii (HI)"),
+ ("ID", "Idaho (ID)"),
+ ("IL", "Illinois (IL)"),
+ ("IN", "Indiana (IN)"),
+ ("IA", "Iowa (IA)"),
+ ("KS", "Kansas (KS)"),
+ ("KY", "Kentucky (KY)"),
+ ("LA", "Louisiana (LA)"),
+ ("ME", "Maine (ME)"),
+ ("MD", "Maryland (MD)"),
+ ("MA", "Massachusetts (MA)"),
+ ("MI", "Michigan (MI)"),
+ ("MN", "Minnesota (MN)"),
+ ("MS", "Mississippi (MS)"),
+ ("MO", "Missouri (MO)"),
+ ("MT", "Montana (MT)"),
+ ("NE", "Nebraska (NE)"),
+ ("NV", "Nevada (NV)"),
+ ("NH", "New Hampshire (NH)"),
+ ("NJ", "New Jersey (NJ)"),
+ ("NM", "New Mexico (NM)"),
+ ("NY", "New York (NY)"),
+ ("NC", "North Carolina (NC)"),
+ ("ND", "North Dakota (ND)"),
+ ("MP", "Northern Mariana Islands (MP)"),
+ ("OH", "Ohio (OH)"),
+ ("OK", "Oklahoma (OK)"),
+ ("OR", "Oregon (OR)"),
+ ("PA", "Pennsylvania (PA)"),
+ ("PR", "Puerto Rico (PR)"),
+ ("RI", "Rhode Island (RI)"),
+ ("SC", "South Carolina (SC)"),
+ ("SD", "South Dakota (SD)"),
+ ("TN", "Tennessee (TN)"),
+ ("TX", "Texas (TX)"),
+ ("UM", "United States Minor Outlying Islands (UM)"),
+ ("UT", "Utah (UT)"),
+ ("VT", "Vermont (VT)"),
+ ("VI", "Virgin Islands (VI)"),
+ ("VA", "Virginia (VA)"),
+ ("WA", "Washington (WA)"),
+ ("WV", "West Virginia (WV)"),
+ ("WI", "Wisconsin (WI)"),
+ ("WY", "Wyoming (WY)"),
+ ("AA", "Armed Forces Americas (AA)"),
+ ("AE", "Armed Forces Africa, Canada, Europe, Middle East (AE)"),
+ ("AP", "Armed Forces Pacific (AP)"),
+ ],
+ max_length=2,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="submitter",
+ field=models.ForeignKey(
+ blank=True,
+ help_text='Person listed under "your contact information" in the request form; will receive email updates',
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="submitted_domain_requests",
+ to="registrar.contact",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="tribe_name",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="urbanization",
+ field=models.CharField(blank=True, help_text="Required for Puetro Rico only", null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="zipcode",
+ field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
+ ),
+ migrations.AlterField(
+ model_name="host",
+ name="domain",
+ field=models.ForeignKey(
+ help_text="Domain associated with this host",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="host",
+ to="registrar.domain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="host",
+ name="name",
+ field=models.CharField(default=None, max_length=253),
+ ),
+ migrations.AlterField(
+ model_name="hostip",
+ name="address",
+ field=models.CharField(
+ default=None, max_length=46, validators=[django.core.validators.validate_ipv46_address]
+ ),
+ ),
+ migrations.AlterField(
+ model_name="hostip",
+ name="host",
+ field=models.ForeignKey(
+ help_text="IP associated with this host",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="ip",
+ to="registrar.host",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="user",
+ name="status",
+ field=models.CharField(
+ blank=True,
+ choices=[("restricted", "restricted")],
+ default=None,
+ help_text='Users in "restricted" status cannot make updates in the registrar or start a new request.',
+ max_length=10,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="verifiedbystaff",
+ name="email",
+ field=models.EmailField(db_index=True, max_length=254),
+ ),
+ migrations.AlterField(
+ model_name="verifiedbystaff",
+ name="notes",
+ field=models.TextField(),
+ ),
+ migrations.AlterField(
+ model_name="verifiedbystaff",
+ name="requestor",
+ field=models.ForeignKey(
+ blank=True,
+ help_text="Person who verified this user",
+ null=True,
+ on_delete=django.db.models.deletion.SET_NULL,
+ related_name="verifiedby_user",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="website",
+ name="website",
+ field=models.CharField(
+ help_text="An alternative domain or current website listed on a domain request", max_length=255
+ ),
+ ),
+ ]
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index e4026be877..d6decc7aa3 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -1016,13 +1016,13 @@ def __str__(self) -> str:
deleted = DateField(
null=True,
editable=False,
- help_text="Will appear blank unless the domain is in \"deleted\" state",
+ help_text='Will appear blank unless the domain is in "deleted" state',
)
first_ready = DateField(
null=True,
editable=False,
- help_text="Date when this domain first moved into \"ready\" state; date will never change",
+ help_text='Date when this domain first moved into "ready" state; date will never change',
)
def isActive(self):
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index 103e5068ae..77d38ef15b 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -175,7 +175,7 @@ class DomainInformation(TimeStampedModel):
blank=True,
related_name="submitted_domain_requests_information",
on_delete=models.PROTECT,
- help_text="Person listed under \"your contact information\" in the request form",
+ help_text='Person listed under "your contact information" in the request form',
)
purpose = models.TextField(
diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py
index 1cd66b4641..cab3c1650e 100644
--- a/src/registrar/models/domain_request.py
+++ b/src/registrar/models/domain_request.py
@@ -606,7 +606,7 @@ class RejectionReasons(models.TextChoices):
blank=True,
related_name="submitted_domain_requests",
on_delete=models.PROTECT,
- help_text="Person listed under \"your contact information\" in the request form; will receive email updates"
+ help_text='Person listed under "your contact information" in the request form; will receive email updates',
)
purpose = models.TextField(
diff --git a/src/registrar/models/host.py b/src/registrar/models/host.py
index 642027592d..52c7857477 100644
--- a/src/registrar/models/host.py
+++ b/src/registrar/models/host.py
@@ -27,7 +27,7 @@ class Host(TimeStampedModel):
"registrar.Domain",
on_delete=models.PROTECT,
related_name="host", # access this Host via the Domain as `domain.host`
- help_text="Domain associated with this hosts",
+ help_text="Domain associated with this host",
)
def __str__(self):
diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py
index 2688ef57f2..e7fc4c75d5 100644
--- a/src/registrar/models/user.py
+++ b/src/registrar/models/user.py
@@ -33,6 +33,7 @@ class User(AbstractUser):
default=None, # Set the default value to None
null=True, # Allow the field to be null
blank=True, # Allow the field to be blank
+ help_text='Users in "restricted" status cannot make updates in the registrar or start a new request.',
)
domains = models.ManyToManyField(
diff --git a/src/registrar/models/verified_by_staff.py b/src/registrar/models/verified_by_staff.py
index a6d8615043..c09dce8224 100644
--- a/src/registrar/models/verified_by_staff.py
+++ b/src/registrar/models/verified_by_staff.py
@@ -9,7 +9,6 @@ class VerifiedByStaff(TimeStampedModel):
email = models.EmailField(
null=False,
blank=False,
- help_text="Email",
db_index=True,
)
@@ -19,12 +18,12 @@ class VerifiedByStaff(TimeStampedModel):
blank=True,
on_delete=models.SET_NULL,
related_name="verifiedby_user",
+ help_text="Person who verified this user",
)
notes = models.TextField(
null=False,
blank=False,
- help_text="Notes",
)
class Meta:
diff --git a/src/registrar/models/website.py b/src/registrar/models/website.py
index 29739b8ee1..a062fe248c 100644
--- a/src/registrar/models/website.py
+++ b/src/registrar/models/website.py
@@ -12,7 +12,7 @@ class Website(TimeStampedModel):
website = models.CharField(
max_length=255,
null=False,
- help_text="",
+ help_text="An alternative domain or current website listed on a domain request",
)
def __str__(self) -> str:
From f5116315e840218424508e329dd15dcbb2c838c4 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 10:53:57 -0600
Subject: [PATCH 03/31] Override help text for AbstractUser
---
src/registrar/admin.py | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 05bfc06b63..57c65199ae 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -48,6 +48,35 @@ class Meta:
"user_permissions": NoAutocompleteFilteredSelectMultiple("user_permissions", False),
}
+ def __init__(self, *args, **kwargs):
+ """Custom init to modify the user form"""
+ super(MyUserAdminForm, self).__init__(*args, **kwargs)
+ self.override_base_help_texts()
+
+ def override_base_help_texts(self):
+ """
+ Used to override pre-existing help texts in AbstractUser.
+ This is done to avoid modifying the base AbstractUser class.
+ """
+ is_superuser = self.fields.get("is_superuser")
+ is_staff = self.fields.get("is_staff")
+ password = self.fields.get("password")
+
+ if is_superuser is not None:
+ is_superuser.help_text = (
+ "For development purposes only; provides superuser access on the database level."
+ )
+
+ if is_staff is not None:
+ is_staff.help_text = "Designates whether the user can log in to this admin site."
+
+ if password is not None:
+ link = f"../../{self.instance.pk}/password/"
+ password.help_text = (
+ "Raw passwords are not stored, so they will not display here. "
+ f'You can change the password using this form.'
+ )
+
class DomainInformationAdminForm(forms.ModelForm):
"""This form utilizes the custom widget for its class's ManyToMany UIs."""
From a8836d35aaa63e1d54cc8f61931047f0034b9caf Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 11:03:46 -0600
Subject: [PATCH 04/31] Linting
---
src/registrar/admin.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 57c65199ae..fbfff218a1 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -51,9 +51,9 @@ class Meta:
def __init__(self, *args, **kwargs):
"""Custom init to modify the user form"""
super(MyUserAdminForm, self).__init__(*args, **kwargs)
- self.override_base_help_texts()
+ self._override_base_help_texts()
- def override_base_help_texts(self):
+ def _override_base_help_texts(self):
"""
Used to override pre-existing help texts in AbstractUser.
This is done to avoid modifying the base AbstractUser class.
@@ -63,14 +63,13 @@ def override_base_help_texts(self):
password = self.fields.get("password")
if is_superuser is not None:
- is_superuser.help_text = (
- "For development purposes only; provides superuser access on the database level."
- )
+ is_superuser.help_text = "For development purposes only; provides superuser access on the database level."
if is_staff is not None:
is_staff.help_text = "Designates whether the user can log in to this admin site."
if password is not None:
+ # Link is copied from the base implementation of UserChangeForm.
link = f"../../{self.instance.pk}/password/"
password.help_text = (
"Raw passwords are not stored, so they will not display here. "
From 18f7ac7f90d9cf493fdb357a1e161822e31e3df9 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 13:49:05 -0600
Subject: [PATCH 05/31] Additional bug fixes
---
src/registrar/admin.py | 26 ++++++++++------
.../migrations/0086_alter_domain_state.py | 31 +++++++++++++++++++
src/registrar/models/domain.py | 29 +++++++++++++++++
.../django/admin/domain_change_form.html | 5 ++-
.../admin/includes/domain_fieldset.html | 12 +++++++
5 files changed, 92 insertions(+), 11 deletions(-)
create mode 100644 src/registrar/migrations/0086_alter_domain_state.py
create mode 100644 src/registrar/templates/django/admin/includes/domain_fieldset.html
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index fbfff218a1..adfbfd0085 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -1690,20 +1690,26 @@ def changeform_view(self, request, object_id=None, form_url="", extra_context=No
# Pass in what the an extended expiration date would be for the expiration date modal
if object_id is not None:
domain = Domain.objects.get(pk=object_id)
- years_to_extend_by = self._get_calculated_years_for_exp_date(domain)
+ extra_context = self._set_expiration_date_context(domain, extra_context)
+ extra_context["state_help_message"] = Domain.State.get_admin_help_text(domain.state)
- try:
- curr_exp_date = domain.registry_expiration_date
- except KeyError:
- # No expiration date was found. Return none.
- extra_context["extended_expiration_date"] = None
- return super().changeform_view(request, object_id, form_url, extra_context)
+ return super().changeform_view(request, object_id, form_url, extra_context)
+
+ def _set_expiration_date_context(self, domain, extra_context):
+ """Given a domain, calculate the an extended expiration date
+ from the current registry expiration date."""
+ years_to_extend_by = self._get_calculated_years_for_exp_date(domain)
+
+ try:
+ curr_exp_date = domain.registry_expiration_date
+ except KeyError:
+ # No expiration date was found. Return none.
+ extra_context["extended_expiration_date"] = None
+ else:
new_date = curr_exp_date + relativedelta(years=years_to_extend_by)
extra_context["extended_expiration_date"] = new_date
- else:
- extra_context["extended_expiration_date"] = None
- return super().changeform_view(request, object_id, form_url, extra_context)
+ return extra_context
def response_change(self, request, obj):
# Create dictionary of action functions
diff --git a/src/registrar/migrations/0086_alter_domain_state.py b/src/registrar/migrations/0086_alter_domain_state.py
new file mode 100644
index 0000000000..61455f56d9
--- /dev/null
+++ b/src/registrar/migrations/0086_alter_domain_state.py
@@ -0,0 +1,31 @@
+# Generated by Django 4.2.10 on 2024-04-15 19:26
+
+from django.db import migrations
+import django_fsm
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("registrar", "0085_alter_domain_deleted_alter_domain_expiration_date_and_more"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="domain",
+ name="state",
+ field=django_fsm.FSMField(
+ choices=[
+ ("unknown", "Unknown"),
+ ("dns needed", "Dns needed"),
+ ("ready", "Ready"),
+ ("on hold", "On hold"),
+ ("deleted", "Deleted"),
+ ],
+ default="unknown",
+ help_text=" ",
+ max_length=21,
+ protected=True,
+ ),
+ ),
+ ]
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index d6decc7aa3..fd2431f6b1 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -159,6 +159,32 @@ def get_help_text(cls, state) -> str:
return help_texts.get(state, "")
+ @classmethod
+ def get_admin_help_text(cls, state) -> str:
+ """Returns a help message for a desired state for /admin. If none is found, an empty string is returned"""
+ admin_help_texts = {
+ # For now, unknown has the same message as DNS_NEEDED
+ cls.UNKNOWN: (
+ "The creator of the associated domain request has not logged in to "
+ "manage the domain since it was approved. "
+ 'The state will switch to "DNS needed" after they access the domain in the registrar.'
+ ),
+ cls.DNS_NEEDED: (
+ "Before this domain can be used, name server addresses need to be added within the registrar."
+ ),
+ cls.READY: "This domain has name servers and is ready for use.",
+ cls.ON_HOLD: (
+ "While on hold, this domain won't resolve in DNS and "
+ "any infrastructure (like websites) will be offline.",
+ ),
+ cls.DELETED: (
+ "This domain was permanently removed from the registry. "
+ "The domain no longer resolves in DNS and any infrastructure (like websites) is offline.",
+ ),
+ }
+
+ return admin_help_texts.get(state, "")
+
class Cache(property):
"""
Python descriptor to turn class methods into properties.
@@ -1000,6 +1026,9 @@ def __str__(self) -> str:
default=State.UNKNOWN,
# cannot change state directly, particularly in Django admin
protected=True,
+ # This must be defined for custom state help messages,
+ # as otherwise the view will purge the help field as it does not exist.
+ help_text=" ",
)
expiration_date = DateField(
diff --git a/src/registrar/templates/django/admin/domain_change_form.html b/src/registrar/templates/django/admin/domain_change_form.html
index 44fe6851b9..80888423da 100644
--- a/src/registrar/templates/django/admin/domain_change_form.html
+++ b/src/registrar/templates/django/admin/domain_change_form.html
@@ -33,7 +33,10 @@
{% endif %}
- {{ block.super }}
+
+ {% for fieldset in adminform %}
+ {% include "django/admin/includes/domain_fieldset.html" with state_help_message=state_help_message %}
+ {% endfor %}
{% endblock %}
{% block submit_buttons_bottom %}
diff --git a/src/registrar/templates/django/admin/includes/domain_fieldset.html b/src/registrar/templates/django/admin/includes/domain_fieldset.html
new file mode 100644
index 0000000000..484378c789
--- /dev/null
+++ b/src/registrar/templates/django/admin/includes/domain_fieldset.html
@@ -0,0 +1,12 @@
+{% extends "admin/fieldset.html" %}
+{% load static url_helpers %}
+
+
+{# .gov override #}
+{% block help_text %}
+ {% if field.field.name == "state" %}
+
+
{{ state_help_message }}
+
+ {% endif %}
+{% endblock help_text %}
From 007ff23587f875ad191d9414463197ff51b716bd Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 13:49:51 -0600
Subject: [PATCH 06/31] Consolidate migrations
---
...d_alter_domain_expiration_date_and_more.py | 3 +-
.../migrations/0086_alter_domain_state.py | 31 -------------------
2 files changed, 2 insertions(+), 32 deletions(-)
delete mode 100644 src/registrar/migrations/0086_alter_domain_state.py
diff --git a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
index 523fc522d8..54aa6179d3 100644
--- a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
+++ b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
@@ -1,4 +1,4 @@
-# Generated by Django 4.2.10 on 2024-04-15 15:55
+# Generated by Django 4.2.10 on 2024-04-15 19:49
from django.conf import settings
import django.core.validators
@@ -53,6 +53,7 @@ class Migration(migrations.Migration):
("deleted", "Deleted"),
],
default="unknown",
+ help_text=" ",
max_length=21,
protected=True,
),
diff --git a/src/registrar/migrations/0086_alter_domain_state.py b/src/registrar/migrations/0086_alter_domain_state.py
deleted file mode 100644
index 61455f56d9..0000000000
--- a/src/registrar/migrations/0086_alter_domain_state.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by Django 4.2.10 on 2024-04-15 19:26
-
-from django.db import migrations
-import django_fsm
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("registrar", "0085_alter_domain_deleted_alter_domain_expiration_date_and_more"),
- ]
-
- operations = [
- migrations.AlterField(
- model_name="domain",
- name="state",
- field=django_fsm.FSMField(
- choices=[
- ("unknown", "Unknown"),
- ("dns needed", "Dns needed"),
- ("ready", "Ready"),
- ("on hold", "On hold"),
- ("deleted", "Deleted"),
- ],
- default="unknown",
- help_text=" ",
- max_length=21,
- protected=True,
- ),
- ),
- ]
From f0e9cd1feced28ca71a0141afef3ee38465a923b Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 13:53:59 -0600
Subject: [PATCH 07/31] Linting
---
src/registrar/models/domain.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index fd2431f6b1..bf24bd0bc4 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -160,7 +160,7 @@ def get_help_text(cls, state) -> str:
return help_texts.get(state, "")
@classmethod
- def get_admin_help_text(cls, state) -> str:
+ def get_admin_help_text(cls, state):
"""Returns a help message for a desired state for /admin. If none is found, an empty string is returned"""
admin_help_texts = {
# For now, unknown has the same message as DNS_NEEDED
From 4a97f1df33a25af79e51373a8a2c0f18f5389993 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 14:02:23 -0600
Subject: [PATCH 08/31] Update domain_fieldset.html
---
.../templates/django/admin/includes/domain_fieldset.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/registrar/templates/django/admin/includes/domain_fieldset.html b/src/registrar/templates/django/admin/includes/domain_fieldset.html
index 484378c789..4147a04e36 100644
--- a/src/registrar/templates/django/admin/includes/domain_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/domain_fieldset.html
@@ -2,11 +2,12 @@
{% load static url_helpers %}
-{# .gov override #}
{% block help_text %}
{% if field.field.name == "state" %}
+ {# .gov override #}
{{ state_help_message }}
+ {# end of .gov override #}
{% endif %}
{% endblock help_text %}
From 41c77f709a143b31cdea1cf9f9cca01ad950377f Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 14:52:14 -0600
Subject: [PATCH 09/31] Unit test part 1
---
.../admin/includes/domain_fieldset.html | 14 +-
src/registrar/tests/test_admin.py | 192 ++++++++++++++++++
2 files changed, 199 insertions(+), 7 deletions(-)
diff --git a/src/registrar/templates/django/admin/includes/domain_fieldset.html b/src/registrar/templates/django/admin/includes/domain_fieldset.html
index 4147a04e36..a2c03189a8 100644
--- a/src/registrar/templates/django/admin/includes/domain_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/domain_fieldset.html
@@ -3,11 +3,11 @@
{% block help_text %}
- {% if field.field.name == "state" %}
-
- {# .gov override #}
-
{{ state_help_message }}
- {# end of .gov override #}
-
- {% endif %}
+
+ {% if field.field.name == "state" %}
+
{{ state_help_message }}
+ {% else %}
+
{{ field.field.help_text|safe }}
+ {% endif %}
+
{% endblock help_text %}
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index bf54efe605..f4d28b2c27 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -18,6 +18,7 @@
AuditedAdmin,
ContactAdmin,
DomainInformationAdmin,
+ MyHostAdmin,
UserDomainRoleAdmin,
VerifiedByStaffAdmin,
)
@@ -30,6 +31,7 @@
Contact,
Website,
DraftDomain,
+ Host,
)
from registrar.models.user_domain_role import UserDomainRole
from registrar.models.verified_by_staff import VerifiedByStaff
@@ -74,6 +76,13 @@ def setUp(self):
self.app.set_user(self.superuser.username)
self.client.force_login(self.superuser)
+ # Add domain data
+ self.ready_domain, _ = Domain.objects.get_or_create(name="fakeready.gov", state=Domain.State.READY)
+ self.unknown_domain, _ = Domain.objects.get_or_create(name="fakeunknown.gov", state=Domain.State.UNKNOWN)
+ self.dns_domain, _ = Domain.objects.get_or_create(name="fakedns.gov", state=Domain.State.DNS_NEEDED)
+ self.hold_domain, _ = Domain.objects.get_or_create(name="fakehold.gov", state=Domain.State.ON_HOLD)
+ self.deleted_domain, _ = Domain.objects.get_or_create(name="fakedeleted.gov", state=Domain.State.DELETED)
+
# Contains some test tools
self.test_helper = GenericTestHelper(
factory=self.factory,
@@ -85,6 +94,79 @@ def setUp(self):
)
super().setUp()
+ def test_helper_text(self):
+ """
+ Tests for the correct helper text on this page
+ """
+
+ # Create a ready domain with a preset expiration date
+ domain, _ = Domain.objects.get_or_create(name="fake.gov", state=Domain.State.READY)
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ response = self.client.get(
+ "/admin/registrar/domain/{}/change/".format(domain.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded, and that we're on the right page
+ self.assertEqual(response.status_code, 200)
+ self.assertContains(response, domain.name)
+
+ # These should exist in the response
+ expected_values = [
+ ("expiration_date", "Date the domain expires in the registry"),
+ ("first_ready_at", 'Date when this domain first moved into "ready" state; date will never change'),
+ ("deleted_at", 'Will appear blank unless the domain is in "deleted" state')
+ ]
+ self.test_helper.assert_response_contains_distinct_values(response, expected_values)
+
+ def test_helper_text_state(self):
+ """
+ Tests for the correct state helper text on this page
+ """
+
+ expected_unknown_domain_message = (
+ "The creator of the associated domain request has not logged in to "
+ "manage the domain since it was approved. "
+ 'The state will switch to "DNS needed" after they access the domain in the registrar.'
+ )
+ expected_dns_message = (
+ "Before this domain can be used, name server addresses need "
+ "to be added within the registrar."
+ )
+ expected_hold_message = (
+ "While on hold, this domain won't resolve in DNS and "
+ "any infrastructure (like websites) will be offline.",
+ )
+ expected_deleted_message = (
+ "This domain was permanently removed from the registry. "
+ "The domain no longer resolves in DNS and any infrastructure (like websites) is offline.",
+ )
+ expected_messages = [
+ (self.ready_domain, "This domain has name servers and is ready for use."),
+ (self.unknown_domain, expected_unknown_domain_message),
+ (self.dns_domain, expected_dns_message),
+ (self.hold_domain, expected_hold_message),
+ (self.deleted_domain, expected_deleted_message),
+ ]
+
+ p = "userpass"
+ self.client.login(username="staffuser", password=p)
+ for domain, message in expected_messages:
+ with self.subTest(domain_state=domain.state):
+ response = self.client.get(
+ "/admin/registrar/domain/{}/change/".format(domain.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded, and that we're on the right page
+ self.assertEqual(response.status_code, 200)
+ self.assertContains(response, domain.name)
+
+ # Check that the right help text exists
+ self.assertContains(response, message, count=1)
+
@patch("registrar.admin.DomainAdmin._get_current_date", return_value=date(2024, 1, 1))
def test_extend_expiration_date_button(self, mock_date_today):
"""
@@ -706,6 +788,38 @@ def setUp(self):
)
self.mock_client = MockSESClient()
+ def test_helper_text(self):
+ """
+ Tests for the correct helper text on this page
+ """
+
+ # Create a fake domain request and domain
+ domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.IN_REVIEW)
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ response = self.client.get(
+ "/admin/registrar/domainrequest/{}/change/".format(domain_request.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded, and that we're on the right page
+ self.assertEqual(response.status_code, 200)
+ self.assertContains(response, domain_request.requested_domain.name)
+
+ # These should exist in the response
+ expected_values = [
+ ("creator", "Person who submitted the domain request; will not receive email updates"),
+ ("submitter", 'Person listed under "your contact information" in the request form; will receive email updates'),
+ ("approved_domain", 'Domain associated with this request; will be blank until request is approved'),
+ ("no_other_contacts_rationale", "Required if creator does not list other employees"),
+ ("alternative_domains", "Other domain names the creator provided for consideration"),
+ ("no_other_contacts_rationale", "Required if creator does not list other employees"),
+ ("Urbanization", "Required for Puerto Rico only")
+ ]
+ self.test_helper.assert_response_contains_distinct_values(response, expected_values)
+
+
@less_console_noise_decorator
def test_analyst_can_see_and_edit_alternative_domain(self):
"""Tests if an analyst can still see and edit the alternative domain field"""
@@ -2237,6 +2351,53 @@ def test_get_filters(self):
self.assertContains(response, retrieved_html, count=1)
+
+class TestHostAdmin(TestCase):
+ def setUp(self):
+ """Setup environment for a mock admin user"""
+ super().setUp()
+ self.site = AdminSite()
+ self.factory = RequestFactory()
+ self.admin = MyHostAdmin(model=Host, admin_site=self.site)
+ self.client = Client(HTTP_HOST="localhost:8080")
+ self.superuser = create_superuser()
+ self.test_helper = GenericTestHelper(
+ factory=self.factory,
+ user=self.superuser,
+ admin=self.admin,
+ url="/admin/registrar/Host/",
+ model=Host,
+ )
+
+ def tearDown(self):
+ super().tearDown()
+ Host.objects.all().delete()
+ Domain.objects.all().delete()
+
+ def test_helper_text(self):
+ """
+ Tests for the correct helper text on this page
+ """
+ domain, _ = Domain.objects.get_or_create(name="fake.gov", state=Domain.State.READY)
+ # Create a fake host
+ host, _ = Host.objects.get_or_create(name="ns1.test.gov", domain=domain)
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ response = self.client.get(
+ "/admin/registrar/host/{}/change/".format(host.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded
+ self.assertEqual(response.status_code, 200)
+
+ # These should exist in the response
+ expected_values = [
+ ("domain", "Domain associated with this host"),
+ ]
+ self.test_helper.assert_response_contains_distinct_values(response, expected_values)
+
class TestDomainInformationAdmin(TestCase):
def setUp(self):
"""Setup environment for a mock admin user"""
@@ -2289,6 +2450,37 @@ def tearDown(self):
Contact.objects.all().delete()
User.objects.all().delete()
+ def test_helper_text(self):
+ """
+ Tests for the correct helper text on this page
+ """
+
+ # Create a fake domain request and domain
+ domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.IN_REVIEW)
+ domain_request.approve()
+ domain_info = DomainInformation.objects.filter(domain=domain_request.approved_domain).get()
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ response = self.client.get(
+ "/admin/registrar/domaininformation/{}/change/".format(domain_info.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded, and that we're on the right page
+ self.assertEqual(response.status_code, 200)
+ self.assertContains(response, domain_info.domain.name)
+
+ # These should exist in the response
+ expected_values = [
+ ("creator", "Person who submitted the domain request"),
+ ("submitter", 'Person listed under "your contact information" in the request form'),
+ ("domain_request", 'Request associated with this domain'),
+ ("no_other_contacts_rationale", "Required if creator does not list other employees"),
+ ("urbanization", "Required for Puerto Rico only")
+ ]
+ self.test_helper.assert_response_contains_distinct_values(response, expected_values)
+
@less_console_noise_decorator
def test_other_contacts_has_readonly_link(self):
"""Tests if the readonly other_contacts field has links"""
From cb5e9e43ea27c18e1021c312e39fa265e4a69168 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 15:07:24 -0600
Subject: [PATCH 10/31] Unit tests part 2
---
src/registrar/tests/test_admin.py | 89 ++++++++++++++++++++++++++-----
1 file changed, 75 insertions(+), 14 deletions(-)
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index f4d28b2c27..61c02c1ce7 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -117,7 +117,7 @@ def test_helper_text(self):
expected_values = [
("expiration_date", "Date the domain expires in the registry"),
("first_ready_at", 'Date when this domain first moved into "ready" state; date will never change'),
- ("deleted_at", 'Will appear blank unless the domain is in "deleted" state')
+ ("deleted_at", 'Will appear blank unless the domain is in "deleted" state'),
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
@@ -132,8 +132,7 @@ def test_helper_text_state(self):
'The state will switch to "DNS needed" after they access the domain in the registrar.'
)
expected_dns_message = (
- "Before this domain can be used, name server addresses need "
- "to be added within the registrar."
+ "Before this domain can be used, name server addresses need " "to be added within the registrar."
)
expected_hold_message = (
"While on hold, this domain won't resolve in DNS and "
@@ -810,16 +809,18 @@ def test_helper_text(self):
# These should exist in the response
expected_values = [
("creator", "Person who submitted the domain request; will not receive email updates"),
- ("submitter", 'Person listed under "your contact information" in the request form; will receive email updates'),
- ("approved_domain", 'Domain associated with this request; will be blank until request is approved'),
+ (
+ "submitter",
+ 'Person listed under "your contact information" in the request form; will receive email updates',
+ ),
+ ("approved_domain", "Domain associated with this request; will be blank until request is approved"),
("no_other_contacts_rationale", "Required if creator does not list other employees"),
("alternative_domains", "Other domain names the creator provided for consideration"),
("no_other_contacts_rationale", "Required if creator does not list other employees"),
- ("Urbanization", "Required for Puerto Rico only")
+ ("Urbanization", "Required for Puerto Rico only"),
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
-
@less_console_noise_decorator
def test_analyst_can_see_and_edit_alternative_domain(self):
"""Tests if an analyst can still see and edit the alternative domain field"""
@@ -2351,7 +2352,6 @@ def test_get_filters(self):
self.assertContains(response, retrieved_html, count=1)
-
class TestHostAdmin(TestCase):
def setUp(self):
"""Setup environment for a mock admin user"""
@@ -2368,7 +2368,7 @@ def setUp(self):
url="/admin/registrar/Host/",
model=Host,
)
-
+
def tearDown(self):
super().tearDown()
Host.objects.all().delete()
@@ -2398,6 +2398,7 @@ def test_helper_text(self):
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
+
class TestDomainInformationAdmin(TestCase):
def setUp(self):
"""Setup environment for a mock admin user"""
@@ -2475,9 +2476,9 @@ def test_helper_text(self):
expected_values = [
("creator", "Person who submitted the domain request"),
("submitter", 'Person listed under "your contact information" in the request form'),
- ("domain_request", 'Request associated with this domain'),
+ ("domain_request", "Request associated with this domain"),
("no_other_contacts_rationale", "Required if creator does not list other employees"),
- ("urbanization", "Required for Puerto Rico only")
+ ("urbanization", "Required for Puerto Rico only"),
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
@@ -2825,7 +2826,7 @@ def test_email_in_search(self):
self.assertContains(response, "Joe Jones AntarcticPolarBears@example.com", count=1)
-class ListHeaderAdminTest(TestCase):
+class TestListHeaderAdmin(TestCase):
def setUp(self):
self.site = AdminSite()
self.factory = RequestFactory()
@@ -2898,10 +2899,38 @@ def tearDown(self):
User.objects.all().delete()
-class MyUserAdminTest(TestCase):
+class TestMyUserAdmin(TestCase):
def setUp(self):
admin_site = AdminSite()
self.admin = MyUserAdmin(model=get_user_model(), admin_site=admin_site)
+ self.client = Client(HTTP_HOST="localhost:8080")
+ self.superuser = create_superuser()
+ self.test_helper = GenericTestHelper(admin=self.admin)
+
+ def test_helper_text(self):
+ """
+ Tests for the correct helper text on this page
+ """
+ user = create_user()
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ response = self.client.get(
+ "/admin/registrar/user/{}/change/".format(user.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded
+ self.assertEqual(response.status_code, 200)
+
+ # These should exist in the response
+ expected_values = [
+ ("password", "Raw passwords are not stored, so they will not display here."),
+ ("status", 'Users in "restricted" status cannot make updates in the registrar or start a new request.'),
+ ("is_staff", "Designates whether the user can log in to this admin site"),
+ ("is_superuser", "For development purposes only; provides superuser access on the database level"),
+ ]
+ self.test_helper.assert_response_contains_distinct_values(response, expected_values)
def test_list_display_without_username(self):
with less_console_noise():
@@ -3417,10 +3446,42 @@ def tearDown(self):
User.objects.all().delete()
-class VerifiedByStaffAdminTestCase(TestCase):
+class TestVerifiedByStaffAdmin(TestCase):
def setUp(self):
+ super().setUp()
+ self.site = AdminSite()
self.superuser = create_superuser()
+ self.admin = VerifiedByStaffAdmin(model=VerifiedByStaff, admin_site=self.site)
self.factory = RequestFactory()
+ self.client = Client(HTTP_HOST="localhost:8080")
+ self.test_helper = GenericTestHelper(admin=self.admin)
+
+ def tearDown(self):
+ super().tearDown()
+ VerifiedByStaff.objects.all().delete()
+ User.objects.all().delete()
+
+ def test_helper_text(self):
+ """
+ Tests for the correct helper text on this page
+ """
+ vip_instance, _ = VerifiedByStaff.objects.get_or_create(email="test@example.com", notes="Test Notes")
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ response = self.client.get(
+ "/admin/registrar/verifiedbystaff/{}/change/".format(vip_instance.pk),
+ follow=True,
+ )
+
+ # Make sure the page loaded
+ self.assertEqual(response.status_code, 200)
+
+ # These should exist in the response
+ expected_values = [
+ ("requestor", "Person who verified this user"),
+ ]
+ self.test_helper.assert_response_contains_distinct_values(response, expected_values)
def test_save_model_sets_user_field(self):
with less_console_noise():
From 2aff68216d4098042e871c94abfd8bc01086fa85 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 15:23:16 -0600
Subject: [PATCH 11/31] Clean up
---
src/registrar/models/domain.py | 4 ++--
src/registrar/models/utility/generic_helper.py | 2 +-
src/registrar/tests/test_admin.py | 7 ++++---
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index bf24bd0bc4..89bf3b7d9d 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -175,11 +175,11 @@ def get_admin_help_text(cls, state):
cls.READY: "This domain has name servers and is ready for use.",
cls.ON_HOLD: (
"While on hold, this domain won't resolve in DNS and "
- "any infrastructure (like websites) will be offline.",
+ "any infrastructure (like websites) will be offline."
),
cls.DELETED: (
"This domain was permanently removed from the registry. "
- "The domain no longer resolves in DNS and any infrastructure (like websites) is offline.",
+ "The domain no longer resolves in DNS and any infrastructure (like websites) is offline."
),
}
diff --git a/src/registrar/models/utility/generic_helper.py b/src/registrar/models/utility/generic_helper.py
index 32f767ede7..a5f899d3c0 100644
--- a/src/registrar/models/utility/generic_helper.py
+++ b/src/registrar/models/utility/generic_helper.py
@@ -154,7 +154,7 @@ def _update_org_type_from_generic_org_and_election(self):
# There is no avenue for this to occur in the UI,
# as such - this can only occur if the object is initialized in this way.
# Or if there are pre-existing data.
- logger.warning(
+ logger.debug(
"create_or_update_organization_type() -> is_election_board "
f"cannot exist for {generic_org_type}. Setting to None."
)
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index 61c02c1ce7..df4f87c460 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -132,15 +132,16 @@ def test_helper_text_state(self):
'The state will switch to "DNS needed" after they access the domain in the registrar.'
)
expected_dns_message = (
- "Before this domain can be used, name server addresses need " "to be added within the registrar."
+ "Before this domain can be used, name server addresses need "
+ "to be added within the registrar."
)
expected_hold_message = (
"While on hold, this domain won't resolve in DNS and "
- "any infrastructure (like websites) will be offline.",
+ "any infrastructure (like websites) will be offline."
)
expected_deleted_message = (
"This domain was permanently removed from the registry. "
- "The domain no longer resolves in DNS and any infrastructure (like websites) is offline.",
+ "The domain no longer resolves in DNS and any infrastructure (like websites) is offline."
)
expected_messages = [
(self.ready_domain, "This domain has name servers and is ready for use."),
From 498becd6c05b4e61dc3b5957749a5bc0e0c5c136 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 15 Apr 2024 15:31:10 -0600
Subject: [PATCH 12/31] Update test_admin.py
---
src/registrar/tests/test_admin.py | 47 +------------------------------
1 file changed, 1 insertion(+), 46 deletions(-)
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index df4f87c460..28b7dfe489 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -94,6 +94,7 @@ def setUp(self):
)
super().setUp()
+ @less_console_noise_decorator
def test_helper_text(self):
"""
Tests for the correct helper text on this page
@@ -121,52 +122,6 @@ def test_helper_text(self):
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
- def test_helper_text_state(self):
- """
- Tests for the correct state helper text on this page
- """
-
- expected_unknown_domain_message = (
- "The creator of the associated domain request has not logged in to "
- "manage the domain since it was approved. "
- 'The state will switch to "DNS needed" after they access the domain in the registrar.'
- )
- expected_dns_message = (
- "Before this domain can be used, name server addresses need "
- "to be added within the registrar."
- )
- expected_hold_message = (
- "While on hold, this domain won't resolve in DNS and "
- "any infrastructure (like websites) will be offline."
- )
- expected_deleted_message = (
- "This domain was permanently removed from the registry. "
- "The domain no longer resolves in DNS and any infrastructure (like websites) is offline."
- )
- expected_messages = [
- (self.ready_domain, "This domain has name servers and is ready for use."),
- (self.unknown_domain, expected_unknown_domain_message),
- (self.dns_domain, expected_dns_message),
- (self.hold_domain, expected_hold_message),
- (self.deleted_domain, expected_deleted_message),
- ]
-
- p = "userpass"
- self.client.login(username="staffuser", password=p)
- for domain, message in expected_messages:
- with self.subTest(domain_state=domain.state):
- response = self.client.get(
- "/admin/registrar/domain/{}/change/".format(domain.pk),
- follow=True,
- )
-
- # Make sure the page loaded, and that we're on the right page
- self.assertEqual(response.status_code, 200)
- self.assertContains(response, domain.name)
-
- # Check that the right help text exists
- self.assertContains(response, message, count=1)
-
@patch("registrar.admin.DomainAdmin._get_current_date", return_value=date(2024, 1, 1))
def test_extend_expiration_date_button(self, mock_date_today):
"""
From 4fd03891e5578e13f4bd60509d795a0ddd3b24a5 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 16 Apr 2024 10:14:14 -0600
Subject: [PATCH 13/31] Fix unit test
---
...d_alter_domain_expiration_date_and_more.py | 1177 -----------------
src/registrar/models/domain_request.py | 2 +-
src/registrar/tests/test_admin.py | 49 +-
3 files changed, 46 insertions(+), 1182 deletions(-)
delete mode 100644 src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
diff --git a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
deleted file mode 100644
index 54aa6179d3..0000000000
--- a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
+++ /dev/null
@@ -1,1177 +0,0 @@
-# Generated by Django 4.2.10 on 2024-04-15 19:49
-
-from django.conf import settings
-import django.core.validators
-from django.db import migrations, models
-import django.db.models.deletion
-import django_fsm
-import registrar.models.utility.domain_field
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("registrar", "0084_create_groups_v11"),
- ]
-
- operations = [
- migrations.AlterField(
- model_name="domain",
- name="deleted",
- field=models.DateField(
- editable=False, help_text='Will appear blank unless the domain is in "deleted" state', null=True
- ),
- ),
- migrations.AlterField(
- model_name="domain",
- name="expiration_date",
- field=models.DateField(help_text="Date the domain expires in the registry", null=True),
- ),
- migrations.AlterField(
- model_name="domain",
- name="first_ready",
- field=models.DateField(
- editable=False,
- help_text='Date when this domain first moved into "ready" state; date will never change',
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domain",
- name="name",
- field=registrar.models.utility.domain_field.DomainField(default=None, max_length=253, unique=True),
- ),
- migrations.AlterField(
- model_name="domain",
- name="state",
- field=django_fsm.FSMField(
- choices=[
- ("unknown", "Unknown"),
- ("dns needed", "Dns needed"),
- ("ready", "Ready"),
- ("on hold", "On hold"),
- ("deleted", "Deleted"),
- ],
- default="unknown",
- help_text=" ",
- max_length=21,
- protected=True,
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="about_your_organization",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="address_line1",
- field=models.CharField(blank=True, null=True, verbose_name="Street address"),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="address_line2",
- field=models.CharField(blank=True, null=True, verbose_name="Street address line 2 (optional)"),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="anything_else",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="city",
- field=models.CharField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="creator",
- field=models.ForeignKey(
- help_text="Person who submitted the domain request",
- on_delete=django.db.models.deletion.PROTECT,
- related_name="information_created",
- to=settings.AUTH_USER_MODEL,
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="domain",
- field=models.OneToOneField(
- blank=True,
- null=True,
- on_delete=django.db.models.deletion.CASCADE,
- related_name="domain_info",
- to="registrar.domain",
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="domain_request",
- field=models.OneToOneField(
- blank=True,
- help_text="Request associated with this domain",
- null=True,
- on_delete=django.db.models.deletion.PROTECT,
- related_name="DomainRequest_info",
- to="registrar.domainrequest",
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="federal_agency",
- field=models.CharField(
- blank=True,
- choices=[
- (
- "Administrative Conference of the United States",
- "Administrative Conference of the United States",
- ),
- ("Advisory Council on Historic Preservation", "Advisory Council on Historic Preservation"),
- ("American Battle Monuments Commission", "American Battle Monuments Commission"),
- ("AMTRAK", "AMTRAK"),
- ("Appalachian Regional Commission", "Appalachian Regional Commission"),
- (
- "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
- "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
- ),
- ("Appraisal Subcommittee", "Appraisal Subcommittee"),
- ("Architect of the Capitol", "Architect of the Capitol"),
- ("Armed Forces Retirement Home", "Armed Forces Retirement Home"),
- (
- "Barry Goldwater Scholarship and Excellence in Education Foundation",
- "Barry Goldwater Scholarship and Excellence in Education Foundation",
- ),
- (
- "Barry Goldwater Scholarship and Excellence in Education Program",
- "Barry Goldwater Scholarship and Excellence in Education Program",
- ),
- ("Central Intelligence Agency", "Central Intelligence Agency"),
- ("Chemical Safety Board", "Chemical Safety Board"),
- ("Christopher Columbus Fellowship Foundation", "Christopher Columbus Fellowship Foundation"),
- ("Civil Rights Cold Case Records Review Board", "Civil Rights Cold Case Records Review Board"),
- (
- "Commission for the Preservation of America's Heritage Abroad",
- "Commission for the Preservation of America's Heritage Abroad",
- ),
- ("Commission of Fine Arts", "Commission of Fine Arts"),
- (
- "Committee for Purchase From People Who Are Blind or Severely Disabled",
- "Committee for Purchase From People Who Are Blind or Severely Disabled",
- ),
- ("Commodity Futures Trading Commission", "Commodity Futures Trading Commission"),
- ("Congressional Budget Office", "Congressional Budget Office"),
- ("Consumer Financial Protection Bureau", "Consumer Financial Protection Bureau"),
- ("Consumer Product Safety Commission", "Consumer Product Safety Commission"),
- ("Corporation for National & Community Service", "Corporation for National & Community Service"),
- (
- "Corporation for National and Community Service",
- "Corporation for National and Community Service",
- ),
- (
- "Council of Inspectors General on Integrity and Efficiency",
- "Council of Inspectors General on Integrity and Efficiency",
- ),
- ("Court Services and Offender Supervision", "Court Services and Offender Supervision"),
- ("Cyberspace Solarium Commission", "Cyberspace Solarium Commission"),
- (
- "DC Court Services and Offender Supervision Agency",
- "DC Court Services and Offender Supervision Agency",
- ),
- ("DC Pre-trial Services", "DC Pre-trial Services"),
- ("Defense Nuclear Facilities Safety Board", "Defense Nuclear Facilities Safety Board"),
- ("Delta Regional Authority", "Delta Regional Authority"),
- ("Denali Commission", "Denali Commission"),
- ("Department of Agriculture", "Department of Agriculture"),
- ("Department of Commerce", "Department of Commerce"),
- ("Department of Defense", "Department of Defense"),
- ("Department of Education", "Department of Education"),
- ("Department of Energy", "Department of Energy"),
- ("Department of Health and Human Services", "Department of Health and Human Services"),
- ("Department of Homeland Security", "Department of Homeland Security"),
- ("Department of Housing and Urban Development", "Department of Housing and Urban Development"),
- ("Department of Justice", "Department of Justice"),
- ("Department of Labor", "Department of Labor"),
- ("Department of State", "Department of State"),
- ("Department of the Interior", "Department of the Interior"),
- ("Department of the Treasury", "Department of the Treasury"),
- ("Department of Transportation", "Department of Transportation"),
- ("Department of Veterans Affairs", "Department of Veterans Affairs"),
- ("Director of National Intelligence", "Director of National Intelligence"),
- ("Dwight D. Eisenhower Memorial Commission", "Dwight D. Eisenhower Memorial Commission"),
- ("Election Assistance Commission", "Election Assistance Commission"),
- ("Environmental Protection Agency", "Environmental Protection Agency"),
- ("Equal Employment Opportunity Commission", "Equal Employment Opportunity Commission"),
- ("Executive Office of the President", "Executive Office of the President"),
- ("Export-Import Bank of the United States", "Export-Import Bank of the United States"),
- ("Export/Import Bank of the U.S.", "Export/Import Bank of the U.S."),
- ("Farm Credit Administration", "Farm Credit Administration"),
- ("Farm Credit System Insurance Corporation", "Farm Credit System Insurance Corporation"),
- ("Federal Communications Commission", "Federal Communications Commission"),
- ("Federal Deposit Insurance Corporation", "Federal Deposit Insurance Corporation"),
- ("Federal Election Commission", "Federal Election Commission"),
- ("Federal Energy Regulatory Commission", "Federal Energy Regulatory Commission"),
- (
- "Federal Financial Institutions Examination Council",
- "Federal Financial Institutions Examination Council",
- ),
- ("Federal Housing Finance Agency", "Federal Housing Finance Agency"),
- ("Federal Judiciary", "Federal Judiciary"),
- ("Federal Labor Relations Authority", "Federal Labor Relations Authority"),
- ("Federal Maritime Commission", "Federal Maritime Commission"),
- ("Federal Mediation and Conciliation Service", "Federal Mediation and Conciliation Service"),
- (
- "Federal Mine Safety and Health Review Commission",
- "Federal Mine Safety and Health Review Commission",
- ),
- (
- "Federal Permitting Improvement Steering Council",
- "Federal Permitting Improvement Steering Council",
- ),
- ("Federal Reserve Board of Governors", "Federal Reserve Board of Governors"),
- ("Federal Reserve System", "Federal Reserve System"),
- ("Federal Trade Commission", "Federal Trade Commission"),
- ("General Services Administration", "General Services Administration"),
- ("gov Administration", "gov Administration"),
- ("Government Accountability Office", "Government Accountability Office"),
- ("Government Publishing Office", "Government Publishing Office"),
- ("Gulf Coast Ecosystem Restoration Council", "Gulf Coast Ecosystem Restoration Council"),
- ("Harry S Truman Scholarship Foundation", "Harry S Truman Scholarship Foundation"),
- ("Harry S. Truman Scholarship Foundation", "Harry S. Truman Scholarship Foundation"),
- ("Institute of Museum and Library Services", "Institute of Museum and Library Services"),
- ("Institute of Peace", "Institute of Peace"),
- ("Inter-American Foundation", "Inter-American Foundation"),
- (
- "International Boundary and Water Commission: United States and Mexico",
- "International Boundary and Water Commission: United States and Mexico",
- ),
- (
- "International Boundary Commission: United States and Canada",
- "International Boundary Commission: United States and Canada",
- ),
- (
- "International Joint Commission: United States and Canada",
- "International Joint Commission: United States and Canada",
- ),
- ("James Madison Memorial Fellowship Foundation", "James Madison Memorial Fellowship Foundation"),
- ("Japan-United States Friendship Commission", "Japan-United States Friendship Commission"),
- ("Japan-US Friendship Commission", "Japan-US Friendship Commission"),
- ("John F. Kennedy Center for Performing Arts", "John F. Kennedy Center for Performing Arts"),
- (
- "John F. Kennedy Center for the Performing Arts",
- "John F. Kennedy Center for the Performing Arts",
- ),
- ("Legal Services Corporation", "Legal Services Corporation"),
- ("Legislative Branch", "Legislative Branch"),
- ("Library of Congress", "Library of Congress"),
- ("Marine Mammal Commission", "Marine Mammal Commission"),
- (
- "Medicaid and CHIP Payment and Access Commission",
- "Medicaid and CHIP Payment and Access Commission",
- ),
- ("Medical Payment Advisory Commission", "Medical Payment Advisory Commission"),
- ("Medicare Payment Advisory Commission", "Medicare Payment Advisory Commission"),
- ("Merit Systems Protection Board", "Merit Systems Protection Board"),
- ("Millennium Challenge Corporation", "Millennium Challenge Corporation"),
- (
- "Morris K. Udall and Stewart L. Udall Foundation",
- "Morris K. Udall and Stewart L. Udall Foundation",
- ),
- ("National Aeronautics and Space Administration", "National Aeronautics and Space Administration"),
- ("National Archives and Records Administration", "National Archives and Records Administration"),
- ("National Capital Planning Commission", "National Capital Planning Commission"),
- ("National Council on Disability", "National Council on Disability"),
- ("National Credit Union Administration", "National Credit Union Administration"),
- ("National Endowment for the Arts", "National Endowment for the Arts"),
- ("National Endowment for the Humanities", "National Endowment for the Humanities"),
- (
- "National Foundation on the Arts and the Humanities",
- "National Foundation on the Arts and the Humanities",
- ),
- ("National Gallery of Art", "National Gallery of Art"),
- ("National Indian Gaming Commission", "National Indian Gaming Commission"),
- ("National Labor Relations Board", "National Labor Relations Board"),
- ("National Mediation Board", "National Mediation Board"),
- ("National Science Foundation", "National Science Foundation"),
- (
- "National Security Commission on Artificial Intelligence",
- "National Security Commission on Artificial Intelligence",
- ),
- ("National Transportation Safety Board", "National Transportation Safety Board"),
- (
- "Networking Information Technology Research and Development",
- "Networking Information Technology Research and Development",
- ),
- ("Non-Federal Agency", "Non-Federal Agency"),
- ("Northern Border Regional Commission", "Northern Border Regional Commission"),
- ("Nuclear Regulatory Commission", "Nuclear Regulatory Commission"),
- ("Nuclear Safety Oversight Committee", "Nuclear Safety Oversight Committee"),
- ("Nuclear Waste Technical Review Board", "Nuclear Waste Technical Review Board"),
- (
- "Occupational Safety & Health Review Commission",
- "Occupational Safety & Health Review Commission",
- ),
- (
- "Occupational Safety and Health Review Commission",
- "Occupational Safety and Health Review Commission",
- ),
- ("Office of Compliance", "Office of Compliance"),
- ("Office of Congressional Workplace Rights", "Office of Congressional Workplace Rights"),
- ("Office of Government Ethics", "Office of Government Ethics"),
- ("Office of Navajo and Hopi Indian Relocation", "Office of Navajo and Hopi Indian Relocation"),
- ("Office of Personnel Management", "Office of Personnel Management"),
- ("Open World Leadership Center", "Open World Leadership Center"),
- ("Overseas Private Investment Corporation", "Overseas Private Investment Corporation"),
- ("Peace Corps", "Peace Corps"),
- ("Pension Benefit Guaranty Corporation", "Pension Benefit Guaranty Corporation"),
- ("Postal Regulatory Commission", "Postal Regulatory Commission"),
- ("Presidio Trust", "Presidio Trust"),
- ("Privacy and Civil Liberties Oversight Board", "Privacy and Civil Liberties Oversight Board"),
- ("Public Buildings Reform Board", "Public Buildings Reform Board"),
- (
- "Public Defender Service for the District of Columbia",
- "Public Defender Service for the District of Columbia",
- ),
- ("Railroad Retirement Board", "Railroad Retirement Board"),
- ("Securities and Exchange Commission", "Securities and Exchange Commission"),
- ("Selective Service System", "Selective Service System"),
- ("Small Business Administration", "Small Business Administration"),
- ("Smithsonian Institution", "Smithsonian Institution"),
- ("Social Security Administration", "Social Security Administration"),
- ("Social Security Advisory Board", "Social Security Advisory Board"),
- ("Southeast Crescent Regional Commission", "Southeast Crescent Regional Commission"),
- ("Southwest Border Regional Commission", "Southwest Border Regional Commission"),
- ("State Justice Institute", "State Justice Institute"),
- ("State, Local, and Tribal Government", "State, Local, and Tribal Government"),
- ("Stennis Center for Public Service", "Stennis Center for Public Service"),
- ("Surface Transportation Board", "Surface Transportation Board"),
- ("Tennessee Valley Authority", "Tennessee Valley Authority"),
- ("The Executive Office of the President", "The Executive Office of the President"),
- ("The Intelligence Community", "The Intelligence Community"),
- ("The Legislative Branch", "The Legislative Branch"),
- ("The Supreme Court", "The Supreme Court"),
- (
- "The United States World War One Centennial Commission",
- "The United States World War One Centennial Commission",
- ),
- ("U.S. Access Board", "U.S. Access Board"),
- ("U.S. Agency for Global Media", "U.S. Agency for Global Media"),
- ("U.S. Agency for International Development", "U.S. Agency for International Development"),
- ("U.S. Capitol Police", "U.S. Capitol Police"),
- ("U.S. Chemical Safety Board", "U.S. Chemical Safety Board"),
- (
- "U.S. China Economic and Security Review Commission",
- "U.S. China Economic and Security Review Commission",
- ),
- (
- "U.S. Commission for the Preservation of Americas Heritage Abroad",
- "U.S. Commission for the Preservation of Americas Heritage Abroad",
- ),
- ("U.S. Commission of Fine Arts", "U.S. Commission of Fine Arts"),
- ("U.S. Commission on Civil Rights", "U.S. Commission on Civil Rights"),
- (
- "U.S. Commission on International Religious Freedom",
- "U.S. Commission on International Religious Freedom",
- ),
- ("U.S. Courts", "U.S. Courts"),
- ("U.S. Department of Agriculture", "U.S. Department of Agriculture"),
- ("U.S. Interagency Council on Homelessness", "U.S. Interagency Council on Homelessness"),
- ("U.S. International Trade Commission", "U.S. International Trade Commission"),
- ("U.S. Nuclear Waste Technical Review Board", "U.S. Nuclear Waste Technical Review Board"),
- ("U.S. Office of Special Counsel", "U.S. Office of Special Counsel"),
- ("U.S. Peace Corps", "U.S. Peace Corps"),
- ("U.S. Postal Service", "U.S. Postal Service"),
- ("U.S. Semiquincentennial Commission", "U.S. Semiquincentennial Commission"),
- ("U.S. Trade and Development Agency", "U.S. Trade and Development Agency"),
- (
- "U.S.-China Economic and Security Review Commission",
- "U.S.-China Economic and Security Review Commission",
- ),
- ("Udall Foundation", "Udall Foundation"),
- ("United States AbilityOne", "United States AbilityOne"),
- ("United States Access Board", "United States Access Board"),
- ("United States African Development Foundation", "United States African Development Foundation"),
- ("United States Agency for Global Media", "United States Agency for Global Media"),
- ("United States Arctic Research Commission", "United States Arctic Research Commission"),
- ("United States Global Change Research Program", "United States Global Change Research Program"),
- ("United States Holocaust Memorial Museum", "United States Holocaust Memorial Museum"),
- ("United States Institute of Peace", "United States Institute of Peace"),
- (
- "United States Interagency Council on Homelessness",
- "United States Interagency Council on Homelessness",
- ),
- (
- "United States International Development Finance Corporation",
- "United States International Development Finance Corporation",
- ),
- ("United States International Trade Commission", "United States International Trade Commission"),
- ("United States Postal Service", "United States Postal Service"),
- ("United States Senate", "United States Senate"),
- ("United States Trade and Development Agency", "United States Trade and Development Agency"),
- (
- "Utah Reclamation Mitigation and Conservation Commission",
- "Utah Reclamation Mitigation and Conservation Commission",
- ),
- ("Vietnam Education Foundation", "Vietnam Education Foundation"),
- ("Western Hemisphere Drug Policy Commission", "Western Hemisphere Drug Policy Commission"),
- (
- "Woodrow Wilson International Center for Scholars",
- "Woodrow Wilson International Center for Scholars",
- ),
- ("World War I Centennial Commission", "World War I Centennial Commission"),
- ],
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="federal_type",
- field=models.CharField(
- blank=True,
- choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
- max_length=50,
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="federally_recognized_tribe",
- field=models.BooleanField(null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="no_other_contacts_rationale",
- field=models.TextField(
- blank=True, help_text="Required if creator does not list other employees", null=True
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="notes",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="organization_name",
- field=models.CharField(blank=True, db_index=True, null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="state_recognized_tribe",
- field=models.BooleanField(null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="state_territory",
- field=models.CharField(
- blank=True,
- choices=[
- ("AL", "Alabama (AL)"),
- ("AK", "Alaska (AK)"),
- ("AS", "American Samoa (AS)"),
- ("AZ", "Arizona (AZ)"),
- ("AR", "Arkansas (AR)"),
- ("CA", "California (CA)"),
- ("CO", "Colorado (CO)"),
- ("CT", "Connecticut (CT)"),
- ("DE", "Delaware (DE)"),
- ("DC", "District of Columbia (DC)"),
- ("FL", "Florida (FL)"),
- ("GA", "Georgia (GA)"),
- ("GU", "Guam (GU)"),
- ("HI", "Hawaii (HI)"),
- ("ID", "Idaho (ID)"),
- ("IL", "Illinois (IL)"),
- ("IN", "Indiana (IN)"),
- ("IA", "Iowa (IA)"),
- ("KS", "Kansas (KS)"),
- ("KY", "Kentucky (KY)"),
- ("LA", "Louisiana (LA)"),
- ("ME", "Maine (ME)"),
- ("MD", "Maryland (MD)"),
- ("MA", "Massachusetts (MA)"),
- ("MI", "Michigan (MI)"),
- ("MN", "Minnesota (MN)"),
- ("MS", "Mississippi (MS)"),
- ("MO", "Missouri (MO)"),
- ("MT", "Montana (MT)"),
- ("NE", "Nebraska (NE)"),
- ("NV", "Nevada (NV)"),
- ("NH", "New Hampshire (NH)"),
- ("NJ", "New Jersey (NJ)"),
- ("NM", "New Mexico (NM)"),
- ("NY", "New York (NY)"),
- ("NC", "North Carolina (NC)"),
- ("ND", "North Dakota (ND)"),
- ("MP", "Northern Mariana Islands (MP)"),
- ("OH", "Ohio (OH)"),
- ("OK", "Oklahoma (OK)"),
- ("OR", "Oregon (OR)"),
- ("PA", "Pennsylvania (PA)"),
- ("PR", "Puerto Rico (PR)"),
- ("RI", "Rhode Island (RI)"),
- ("SC", "South Carolina (SC)"),
- ("SD", "South Dakota (SD)"),
- ("TN", "Tennessee (TN)"),
- ("TX", "Texas (TX)"),
- ("UM", "United States Minor Outlying Islands (UM)"),
- ("UT", "Utah (UT)"),
- ("VT", "Vermont (VT)"),
- ("VI", "Virgin Islands (VI)"),
- ("VA", "Virginia (VA)"),
- ("WA", "Washington (WA)"),
- ("WV", "West Virginia (WV)"),
- ("WI", "Wisconsin (WI)"),
- ("WY", "Wyoming (WY)"),
- ("AA", "Armed Forces Americas (AA)"),
- ("AE", "Armed Forces Africa, Canada, Europe, Middle East (AE)"),
- ("AP", "Armed Forces Pacific (AP)"),
- ],
- max_length=2,
- null=True,
- verbose_name="State, territory, or military post",
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="submitter",
- field=models.ForeignKey(
- blank=True,
- help_text='Person listed under "your contact information" in the request form',
- null=True,
- on_delete=django.db.models.deletion.PROTECT,
- related_name="submitted_domain_requests_information",
- to="registrar.contact",
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="tribe_name",
- field=models.CharField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="urbanization",
- field=models.CharField(
- blank=True,
- help_text="Required for Puerto Rico only",
- null=True,
- verbose_name="Urbanization (required for Puerto Rico only)",
- ),
- ),
- migrations.AlterField(
- model_name="domaininformation",
- name="zipcode",
- field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="about_your_organization",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="address_line1",
- field=models.CharField(blank=True, null=True, verbose_name="Address line 1"),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="address_line2",
- field=models.CharField(blank=True, null=True, verbose_name="Address line 2"),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="alternative_domains",
- field=models.ManyToManyField(
- blank=True,
- help_text="Other domain names the creator provided for consideration",
- related_name="alternatives+",
- to="registrar.website",
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="anything_else",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="approved_domain",
- field=models.OneToOneField(
- blank=True,
- help_text="Domain associated with this request; will be blank until request is approved",
- null=True,
- on_delete=django.db.models.deletion.SET_NULL,
- related_name="domain_request",
- to="registrar.domain",
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="city",
- field=models.CharField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="creator",
- field=models.ForeignKey(
- help_text="Person who submitted the domain request; will not receive email updates",
- on_delete=django.db.models.deletion.PROTECT,
- related_name="domain_requests_created",
- to=settings.AUTH_USER_MODEL,
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="federal_agency",
- field=models.CharField(
- blank=True,
- choices=[
- (
- "Administrative Conference of the United States",
- "Administrative Conference of the United States",
- ),
- ("Advisory Council on Historic Preservation", "Advisory Council on Historic Preservation"),
- ("American Battle Monuments Commission", "American Battle Monuments Commission"),
- ("AMTRAK", "AMTRAK"),
- ("Appalachian Regional Commission", "Appalachian Regional Commission"),
- (
- "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
- "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
- ),
- ("Appraisal Subcommittee", "Appraisal Subcommittee"),
- ("Architect of the Capitol", "Architect of the Capitol"),
- ("Armed Forces Retirement Home", "Armed Forces Retirement Home"),
- (
- "Barry Goldwater Scholarship and Excellence in Education Foundation",
- "Barry Goldwater Scholarship and Excellence in Education Foundation",
- ),
- (
- "Barry Goldwater Scholarship and Excellence in Education Program",
- "Barry Goldwater Scholarship and Excellence in Education Program",
- ),
- ("Central Intelligence Agency", "Central Intelligence Agency"),
- ("Chemical Safety Board", "Chemical Safety Board"),
- ("Christopher Columbus Fellowship Foundation", "Christopher Columbus Fellowship Foundation"),
- ("Civil Rights Cold Case Records Review Board", "Civil Rights Cold Case Records Review Board"),
- (
- "Commission for the Preservation of America's Heritage Abroad",
- "Commission for the Preservation of America's Heritage Abroad",
- ),
- ("Commission of Fine Arts", "Commission of Fine Arts"),
- (
- "Committee for Purchase From People Who Are Blind or Severely Disabled",
- "Committee for Purchase From People Who Are Blind or Severely Disabled",
- ),
- ("Commodity Futures Trading Commission", "Commodity Futures Trading Commission"),
- ("Congressional Budget Office", "Congressional Budget Office"),
- ("Consumer Financial Protection Bureau", "Consumer Financial Protection Bureau"),
- ("Consumer Product Safety Commission", "Consumer Product Safety Commission"),
- ("Corporation for National & Community Service", "Corporation for National & Community Service"),
- (
- "Corporation for National and Community Service",
- "Corporation for National and Community Service",
- ),
- (
- "Council of Inspectors General on Integrity and Efficiency",
- "Council of Inspectors General on Integrity and Efficiency",
- ),
- ("Court Services and Offender Supervision", "Court Services and Offender Supervision"),
- ("Cyberspace Solarium Commission", "Cyberspace Solarium Commission"),
- (
- "DC Court Services and Offender Supervision Agency",
- "DC Court Services and Offender Supervision Agency",
- ),
- ("DC Pre-trial Services", "DC Pre-trial Services"),
- ("Defense Nuclear Facilities Safety Board", "Defense Nuclear Facilities Safety Board"),
- ("Delta Regional Authority", "Delta Regional Authority"),
- ("Denali Commission", "Denali Commission"),
- ("Department of Agriculture", "Department of Agriculture"),
- ("Department of Commerce", "Department of Commerce"),
- ("Department of Defense", "Department of Defense"),
- ("Department of Education", "Department of Education"),
- ("Department of Energy", "Department of Energy"),
- ("Department of Health and Human Services", "Department of Health and Human Services"),
- ("Department of Homeland Security", "Department of Homeland Security"),
- ("Department of Housing and Urban Development", "Department of Housing and Urban Development"),
- ("Department of Justice", "Department of Justice"),
- ("Department of Labor", "Department of Labor"),
- ("Department of State", "Department of State"),
- ("Department of the Interior", "Department of the Interior"),
- ("Department of the Treasury", "Department of the Treasury"),
- ("Department of Transportation", "Department of Transportation"),
- ("Department of Veterans Affairs", "Department of Veterans Affairs"),
- ("Director of National Intelligence", "Director of National Intelligence"),
- ("Dwight D. Eisenhower Memorial Commission", "Dwight D. Eisenhower Memorial Commission"),
- ("Election Assistance Commission", "Election Assistance Commission"),
- ("Environmental Protection Agency", "Environmental Protection Agency"),
- ("Equal Employment Opportunity Commission", "Equal Employment Opportunity Commission"),
- ("Executive Office of the President", "Executive Office of the President"),
- ("Export-Import Bank of the United States", "Export-Import Bank of the United States"),
- ("Export/Import Bank of the U.S.", "Export/Import Bank of the U.S."),
- ("Farm Credit Administration", "Farm Credit Administration"),
- ("Farm Credit System Insurance Corporation", "Farm Credit System Insurance Corporation"),
- ("Federal Communications Commission", "Federal Communications Commission"),
- ("Federal Deposit Insurance Corporation", "Federal Deposit Insurance Corporation"),
- ("Federal Election Commission", "Federal Election Commission"),
- ("Federal Energy Regulatory Commission", "Federal Energy Regulatory Commission"),
- (
- "Federal Financial Institutions Examination Council",
- "Federal Financial Institutions Examination Council",
- ),
- ("Federal Housing Finance Agency", "Federal Housing Finance Agency"),
- ("Federal Judiciary", "Federal Judiciary"),
- ("Federal Labor Relations Authority", "Federal Labor Relations Authority"),
- ("Federal Maritime Commission", "Federal Maritime Commission"),
- ("Federal Mediation and Conciliation Service", "Federal Mediation and Conciliation Service"),
- (
- "Federal Mine Safety and Health Review Commission",
- "Federal Mine Safety and Health Review Commission",
- ),
- (
- "Federal Permitting Improvement Steering Council",
- "Federal Permitting Improvement Steering Council",
- ),
- ("Federal Reserve Board of Governors", "Federal Reserve Board of Governors"),
- ("Federal Reserve System", "Federal Reserve System"),
- ("Federal Trade Commission", "Federal Trade Commission"),
- ("General Services Administration", "General Services Administration"),
- ("gov Administration", "gov Administration"),
- ("Government Accountability Office", "Government Accountability Office"),
- ("Government Publishing Office", "Government Publishing Office"),
- ("Gulf Coast Ecosystem Restoration Council", "Gulf Coast Ecosystem Restoration Council"),
- ("Harry S Truman Scholarship Foundation", "Harry S Truman Scholarship Foundation"),
- ("Harry S. Truman Scholarship Foundation", "Harry S. Truman Scholarship Foundation"),
- ("Institute of Museum and Library Services", "Institute of Museum and Library Services"),
- ("Institute of Peace", "Institute of Peace"),
- ("Inter-American Foundation", "Inter-American Foundation"),
- (
- "International Boundary and Water Commission: United States and Mexico",
- "International Boundary and Water Commission: United States and Mexico",
- ),
- (
- "International Boundary Commission: United States and Canada",
- "International Boundary Commission: United States and Canada",
- ),
- (
- "International Joint Commission: United States and Canada",
- "International Joint Commission: United States and Canada",
- ),
- ("James Madison Memorial Fellowship Foundation", "James Madison Memorial Fellowship Foundation"),
- ("Japan-United States Friendship Commission", "Japan-United States Friendship Commission"),
- ("Japan-US Friendship Commission", "Japan-US Friendship Commission"),
- ("John F. Kennedy Center for Performing Arts", "John F. Kennedy Center for Performing Arts"),
- (
- "John F. Kennedy Center for the Performing Arts",
- "John F. Kennedy Center for the Performing Arts",
- ),
- ("Legal Services Corporation", "Legal Services Corporation"),
- ("Legislative Branch", "Legislative Branch"),
- ("Library of Congress", "Library of Congress"),
- ("Marine Mammal Commission", "Marine Mammal Commission"),
- (
- "Medicaid and CHIP Payment and Access Commission",
- "Medicaid and CHIP Payment and Access Commission",
- ),
- ("Medical Payment Advisory Commission", "Medical Payment Advisory Commission"),
- ("Medicare Payment Advisory Commission", "Medicare Payment Advisory Commission"),
- ("Merit Systems Protection Board", "Merit Systems Protection Board"),
- ("Millennium Challenge Corporation", "Millennium Challenge Corporation"),
- (
- "Morris K. Udall and Stewart L. Udall Foundation",
- "Morris K. Udall and Stewart L. Udall Foundation",
- ),
- ("National Aeronautics and Space Administration", "National Aeronautics and Space Administration"),
- ("National Archives and Records Administration", "National Archives and Records Administration"),
- ("National Capital Planning Commission", "National Capital Planning Commission"),
- ("National Council on Disability", "National Council on Disability"),
- ("National Credit Union Administration", "National Credit Union Administration"),
- ("National Endowment for the Arts", "National Endowment for the Arts"),
- ("National Endowment for the Humanities", "National Endowment for the Humanities"),
- (
- "National Foundation on the Arts and the Humanities",
- "National Foundation on the Arts and the Humanities",
- ),
- ("National Gallery of Art", "National Gallery of Art"),
- ("National Indian Gaming Commission", "National Indian Gaming Commission"),
- ("National Labor Relations Board", "National Labor Relations Board"),
- ("National Mediation Board", "National Mediation Board"),
- ("National Science Foundation", "National Science Foundation"),
- (
- "National Security Commission on Artificial Intelligence",
- "National Security Commission on Artificial Intelligence",
- ),
- ("National Transportation Safety Board", "National Transportation Safety Board"),
- (
- "Networking Information Technology Research and Development",
- "Networking Information Technology Research and Development",
- ),
- ("Non-Federal Agency", "Non-Federal Agency"),
- ("Northern Border Regional Commission", "Northern Border Regional Commission"),
- ("Nuclear Regulatory Commission", "Nuclear Regulatory Commission"),
- ("Nuclear Safety Oversight Committee", "Nuclear Safety Oversight Committee"),
- ("Nuclear Waste Technical Review Board", "Nuclear Waste Technical Review Board"),
- (
- "Occupational Safety & Health Review Commission",
- "Occupational Safety & Health Review Commission",
- ),
- (
- "Occupational Safety and Health Review Commission",
- "Occupational Safety and Health Review Commission",
- ),
- ("Office of Compliance", "Office of Compliance"),
- ("Office of Congressional Workplace Rights", "Office of Congressional Workplace Rights"),
- ("Office of Government Ethics", "Office of Government Ethics"),
- ("Office of Navajo and Hopi Indian Relocation", "Office of Navajo and Hopi Indian Relocation"),
- ("Office of Personnel Management", "Office of Personnel Management"),
- ("Open World Leadership Center", "Open World Leadership Center"),
- ("Overseas Private Investment Corporation", "Overseas Private Investment Corporation"),
- ("Peace Corps", "Peace Corps"),
- ("Pension Benefit Guaranty Corporation", "Pension Benefit Guaranty Corporation"),
- ("Postal Regulatory Commission", "Postal Regulatory Commission"),
- ("Presidio Trust", "Presidio Trust"),
- ("Privacy and Civil Liberties Oversight Board", "Privacy and Civil Liberties Oversight Board"),
- ("Public Buildings Reform Board", "Public Buildings Reform Board"),
- (
- "Public Defender Service for the District of Columbia",
- "Public Defender Service for the District of Columbia",
- ),
- ("Railroad Retirement Board", "Railroad Retirement Board"),
- ("Securities and Exchange Commission", "Securities and Exchange Commission"),
- ("Selective Service System", "Selective Service System"),
- ("Small Business Administration", "Small Business Administration"),
- ("Smithsonian Institution", "Smithsonian Institution"),
- ("Social Security Administration", "Social Security Administration"),
- ("Social Security Advisory Board", "Social Security Advisory Board"),
- ("Southeast Crescent Regional Commission", "Southeast Crescent Regional Commission"),
- ("Southwest Border Regional Commission", "Southwest Border Regional Commission"),
- ("State Justice Institute", "State Justice Institute"),
- ("State, Local, and Tribal Government", "State, Local, and Tribal Government"),
- ("Stennis Center for Public Service", "Stennis Center for Public Service"),
- ("Surface Transportation Board", "Surface Transportation Board"),
- ("Tennessee Valley Authority", "Tennessee Valley Authority"),
- ("The Executive Office of the President", "The Executive Office of the President"),
- ("The Intelligence Community", "The Intelligence Community"),
- ("The Legislative Branch", "The Legislative Branch"),
- ("The Supreme Court", "The Supreme Court"),
- (
- "The United States World War One Centennial Commission",
- "The United States World War One Centennial Commission",
- ),
- ("U.S. Access Board", "U.S. Access Board"),
- ("U.S. Agency for Global Media", "U.S. Agency for Global Media"),
- ("U.S. Agency for International Development", "U.S. Agency for International Development"),
- ("U.S. Capitol Police", "U.S. Capitol Police"),
- ("U.S. Chemical Safety Board", "U.S. Chemical Safety Board"),
- (
- "U.S. China Economic and Security Review Commission",
- "U.S. China Economic and Security Review Commission",
- ),
- (
- "U.S. Commission for the Preservation of Americas Heritage Abroad",
- "U.S. Commission for the Preservation of Americas Heritage Abroad",
- ),
- ("U.S. Commission of Fine Arts", "U.S. Commission of Fine Arts"),
- ("U.S. Commission on Civil Rights", "U.S. Commission on Civil Rights"),
- (
- "U.S. Commission on International Religious Freedom",
- "U.S. Commission on International Religious Freedom",
- ),
- ("U.S. Courts", "U.S. Courts"),
- ("U.S. Department of Agriculture", "U.S. Department of Agriculture"),
- ("U.S. Interagency Council on Homelessness", "U.S. Interagency Council on Homelessness"),
- ("U.S. International Trade Commission", "U.S. International Trade Commission"),
- ("U.S. Nuclear Waste Technical Review Board", "U.S. Nuclear Waste Technical Review Board"),
- ("U.S. Office of Special Counsel", "U.S. Office of Special Counsel"),
- ("U.S. Peace Corps", "U.S. Peace Corps"),
- ("U.S. Postal Service", "U.S. Postal Service"),
- ("U.S. Semiquincentennial Commission", "U.S. Semiquincentennial Commission"),
- ("U.S. Trade and Development Agency", "U.S. Trade and Development Agency"),
- (
- "U.S.-China Economic and Security Review Commission",
- "U.S.-China Economic and Security Review Commission",
- ),
- ("Udall Foundation", "Udall Foundation"),
- ("United States AbilityOne", "United States AbilityOne"),
- ("United States Access Board", "United States Access Board"),
- ("United States African Development Foundation", "United States African Development Foundation"),
- ("United States Agency for Global Media", "United States Agency for Global Media"),
- ("United States Arctic Research Commission", "United States Arctic Research Commission"),
- ("United States Global Change Research Program", "United States Global Change Research Program"),
- ("United States Holocaust Memorial Museum", "United States Holocaust Memorial Museum"),
- ("United States Institute of Peace", "United States Institute of Peace"),
- (
- "United States Interagency Council on Homelessness",
- "United States Interagency Council on Homelessness",
- ),
- (
- "United States International Development Finance Corporation",
- "United States International Development Finance Corporation",
- ),
- ("United States International Trade Commission", "United States International Trade Commission"),
- ("United States Postal Service", "United States Postal Service"),
- ("United States Senate", "United States Senate"),
- ("United States Trade and Development Agency", "United States Trade and Development Agency"),
- (
- "Utah Reclamation Mitigation and Conservation Commission",
- "Utah Reclamation Mitigation and Conservation Commission",
- ),
- ("Vietnam Education Foundation", "Vietnam Education Foundation"),
- ("Western Hemisphere Drug Policy Commission", "Western Hemisphere Drug Policy Commission"),
- (
- "Woodrow Wilson International Center for Scholars",
- "Woodrow Wilson International Center for Scholars",
- ),
- ("World War I Centennial Commission", "World War I Centennial Commission"),
- ],
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="federal_type",
- field=models.CharField(
- blank=True,
- choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
- max_length=50,
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="federally_recognized_tribe",
- field=models.BooleanField(null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="generic_org_type",
- field=models.CharField(
- blank=True,
- choices=[
- ("federal", "Federal"),
- ("interstate", "Interstate"),
- ("state_or_territory", "State or territory"),
- ("tribal", "Tribal"),
- ("county", "County"),
- ("city", "City"),
- ("special_district", "Special district"),
- ("school_district", "School district"),
- ],
- max_length=255,
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="is_election_board",
- field=models.BooleanField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="no_other_contacts_rationale",
- field=models.TextField(
- blank=True, help_text="Required if creator does not list other employees", null=True
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="notes",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="organization_name",
- field=models.CharField(blank=True, db_index=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="purpose",
- field=models.TextField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="requested_domain",
- field=models.OneToOneField(
- blank=True,
- null=True,
- on_delete=django.db.models.deletion.PROTECT,
- related_name="domain_request",
- to="registrar.draftdomain",
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="state_recognized_tribe",
- field=models.BooleanField(null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="state_territory",
- field=models.CharField(
- blank=True,
- choices=[
- ("AL", "Alabama (AL)"),
- ("AK", "Alaska (AK)"),
- ("AS", "American Samoa (AS)"),
- ("AZ", "Arizona (AZ)"),
- ("AR", "Arkansas (AR)"),
- ("CA", "California (CA)"),
- ("CO", "Colorado (CO)"),
- ("CT", "Connecticut (CT)"),
- ("DE", "Delaware (DE)"),
- ("DC", "District of Columbia (DC)"),
- ("FL", "Florida (FL)"),
- ("GA", "Georgia (GA)"),
- ("GU", "Guam (GU)"),
- ("HI", "Hawaii (HI)"),
- ("ID", "Idaho (ID)"),
- ("IL", "Illinois (IL)"),
- ("IN", "Indiana (IN)"),
- ("IA", "Iowa (IA)"),
- ("KS", "Kansas (KS)"),
- ("KY", "Kentucky (KY)"),
- ("LA", "Louisiana (LA)"),
- ("ME", "Maine (ME)"),
- ("MD", "Maryland (MD)"),
- ("MA", "Massachusetts (MA)"),
- ("MI", "Michigan (MI)"),
- ("MN", "Minnesota (MN)"),
- ("MS", "Mississippi (MS)"),
- ("MO", "Missouri (MO)"),
- ("MT", "Montana (MT)"),
- ("NE", "Nebraska (NE)"),
- ("NV", "Nevada (NV)"),
- ("NH", "New Hampshire (NH)"),
- ("NJ", "New Jersey (NJ)"),
- ("NM", "New Mexico (NM)"),
- ("NY", "New York (NY)"),
- ("NC", "North Carolina (NC)"),
- ("ND", "North Dakota (ND)"),
- ("MP", "Northern Mariana Islands (MP)"),
- ("OH", "Ohio (OH)"),
- ("OK", "Oklahoma (OK)"),
- ("OR", "Oregon (OR)"),
- ("PA", "Pennsylvania (PA)"),
- ("PR", "Puerto Rico (PR)"),
- ("RI", "Rhode Island (RI)"),
- ("SC", "South Carolina (SC)"),
- ("SD", "South Dakota (SD)"),
- ("TN", "Tennessee (TN)"),
- ("TX", "Texas (TX)"),
- ("UM", "United States Minor Outlying Islands (UM)"),
- ("UT", "Utah (UT)"),
- ("VT", "Vermont (VT)"),
- ("VI", "Virgin Islands (VI)"),
- ("VA", "Virginia (VA)"),
- ("WA", "Washington (WA)"),
- ("WV", "West Virginia (WV)"),
- ("WI", "Wisconsin (WI)"),
- ("WY", "Wyoming (WY)"),
- ("AA", "Armed Forces Americas (AA)"),
- ("AE", "Armed Forces Africa, Canada, Europe, Middle East (AE)"),
- ("AP", "Armed Forces Pacific (AP)"),
- ],
- max_length=2,
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="submitter",
- field=models.ForeignKey(
- blank=True,
- help_text='Person listed under "your contact information" in the request form; will receive email updates',
- null=True,
- on_delete=django.db.models.deletion.PROTECT,
- related_name="submitted_domain_requests",
- to="registrar.contact",
- ),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="tribe_name",
- field=models.CharField(blank=True, null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="urbanization",
- field=models.CharField(blank=True, help_text="Required for Puetro Rico only", null=True),
- ),
- migrations.AlterField(
- model_name="domainrequest",
- name="zipcode",
- field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
- ),
- migrations.AlterField(
- model_name="host",
- name="domain",
- field=models.ForeignKey(
- help_text="Domain associated with this host",
- on_delete=django.db.models.deletion.PROTECT,
- related_name="host",
- to="registrar.domain",
- ),
- ),
- migrations.AlterField(
- model_name="host",
- name="name",
- field=models.CharField(default=None, max_length=253),
- ),
- migrations.AlterField(
- model_name="hostip",
- name="address",
- field=models.CharField(
- default=None, max_length=46, validators=[django.core.validators.validate_ipv46_address]
- ),
- ),
- migrations.AlterField(
- model_name="hostip",
- name="host",
- field=models.ForeignKey(
- help_text="IP associated with this host",
- on_delete=django.db.models.deletion.PROTECT,
- related_name="ip",
- to="registrar.host",
- ),
- ),
- migrations.AlterField(
- model_name="user",
- name="status",
- field=models.CharField(
- blank=True,
- choices=[("restricted", "restricted")],
- default=None,
- help_text='Users in "restricted" status cannot make updates in the registrar or start a new request.',
- max_length=10,
- null=True,
- ),
- ),
- migrations.AlterField(
- model_name="verifiedbystaff",
- name="email",
- field=models.EmailField(db_index=True, max_length=254),
- ),
- migrations.AlterField(
- model_name="verifiedbystaff",
- name="notes",
- field=models.TextField(),
- ),
- migrations.AlterField(
- model_name="verifiedbystaff",
- name="requestor",
- field=models.ForeignKey(
- blank=True,
- help_text="Person who verified this user",
- null=True,
- on_delete=django.db.models.deletion.SET_NULL,
- related_name="verifiedby_user",
- to=settings.AUTH_USER_MODEL,
- ),
- ),
- migrations.AlterField(
- model_name="website",
- name="website",
- field=models.CharField(
- help_text="An alternative domain or current website listed on a domain request", max_length=255
- ),
- ),
- ]
diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py
index cab3c1650e..7bcd36e8af 100644
--- a/src/registrar/models/domain_request.py
+++ b/src/registrar/models/domain_request.py
@@ -550,7 +550,7 @@ class RejectionReasons(models.TextChoices):
urbanization = models.CharField(
null=True,
blank=True,
- help_text="Required for Puetro Rico only",
+ help_text="Required for Puerto Rico only",
)
about_your_organization = models.TextField(
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index 28b7dfe489..9791fdd688 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -122,6 +122,40 @@ def test_helper_text(self):
]
self.test_helper.assert_response_contains_distinct_values(response, expected_values)
+ @less_console_noise_decorator
+ def test_helper_text_state(self):
+ """
+ Tests for the correct state helper text on this page
+ """
+
+ # We don't need to check for all text content, just a portion of it
+ expected_unknown_domain_message = "The creator of the associated domain request has not logged in to"
+ expected_dns_message = "Before this domain can be used, name server addresses need"
+ expected_hold_message = "While on hold, this domain"
+ expected_deleted_message = "This domain was permanently removed from the registry."
+ expected_messages = [
+ (self.ready_domain, "This domain has name servers and is ready for use."),
+ (self.unknown_domain, expected_unknown_domain_message),
+ (self.dns_domain, expected_dns_message),
+ (self.hold_domain, expected_hold_message),
+ (self.deleted_domain, expected_deleted_message),
+ ]
+
+ p = "adminpass"
+ self.client.login(username="superuser", password=p)
+ for domain, message in expected_messages:
+ with self.subTest(domain_state=domain.state):
+ response = self.client.get(
+ "/admin/registrar/domain/{}/change/".format(domain.id),
+ )
+
+ # Make sure the page loaded, and that we're on the right page
+ self.assertEqual(response.status_code, 200)
+ self.assertContains(response, domain.name)
+
+ # Check that the right help text exists
+ self.assertContains(response, message)
+
@patch("registrar.admin.DomainAdmin._get_current_date", return_value=date(2024, 1, 1))
def test_extend_expiration_date_button(self, mock_date_today):
"""
@@ -743,6 +777,7 @@ def setUp(self):
)
self.mock_client = MockSESClient()
+ @less_console_noise_decorator
def test_helper_text(self):
"""
Tests for the correct helper text on this page
@@ -2330,6 +2365,7 @@ def tearDown(self):
Host.objects.all().delete()
Domain.objects.all().delete()
+ @less_console_noise_decorator
def test_helper_text(self):
"""
Tests for the correct helper text on this page
@@ -2407,6 +2443,7 @@ def tearDown(self):
Contact.objects.all().delete()
User.objects.all().delete()
+ @less_console_noise_decorator
def test_helper_text(self):
"""
Tests for the correct helper text on this page
@@ -2863,6 +2900,11 @@ def setUp(self):
self.superuser = create_superuser()
self.test_helper = GenericTestHelper(admin=self.admin)
+ def tearDown(self):
+ super().tearDown()
+ User.objects.all().delete()
+
+ @less_console_noise_decorator
def test_helper_text(self):
"""
Tests for the correct helper text on this page
@@ -2908,8 +2950,9 @@ def test_list_display_without_username(self):
def test_get_fieldsets_superuser(self):
with less_console_noise():
request = self.client.request().wsgi_request
- request.user = create_superuser()
+ request.user = self.superuser
fieldsets = self.admin.get_fieldsets(request)
+
expected_fieldsets = super(MyUserAdmin, self.admin).get_fieldsets(request)
self.assertEqual(fieldsets, expected_fieldsets)
@@ -2926,9 +2969,6 @@ def test_get_fieldsets_cisa_analyst(self):
)
self.assertEqual(fieldsets, expected_fieldsets)
- def tearDown(self):
- User.objects.all().delete()
-
class AuditedAdminTest(TestCase):
def setUp(self):
@@ -3417,6 +3457,7 @@ def tearDown(self):
VerifiedByStaff.objects.all().delete()
User.objects.all().delete()
+ @less_console_noise_decorator
def test_helper_text(self):
"""
Tests for the correct helper text on this page
From f8ea204e77c4118643d3aa177d82e8ebfffb9ab0 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 16 Apr 2024 10:17:08 -0600
Subject: [PATCH 14/31] Readd migration
---
...d_alter_domain_expiration_date_and_more.py | 1177 +++++++++++++++++
1 file changed, 1177 insertions(+)
create mode 100644 src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
diff --git a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
new file mode 100644
index 0000000000..3590d3869a
--- /dev/null
+++ b/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
@@ -0,0 +1,1177 @@
+# Generated by Django 4.2.10 on 2024-04-16 16:17
+
+from django.conf import settings
+import django.core.validators
+from django.db import migrations, models
+import django.db.models.deletion
+import django_fsm
+import registrar.models.utility.domain_field
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("registrar", "0084_create_groups_v11"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="domain",
+ name="deleted",
+ field=models.DateField(
+ editable=False, help_text='Will appear blank unless the domain is in "deleted" state', null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="expiration_date",
+ field=models.DateField(help_text="Date the domain expires in the registry", null=True),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="first_ready",
+ field=models.DateField(
+ editable=False,
+ help_text='Date when this domain first moved into "ready" state; date will never change',
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="name",
+ field=registrar.models.utility.domain_field.DomainField(default=None, max_length=253, unique=True),
+ ),
+ migrations.AlterField(
+ model_name="domain",
+ name="state",
+ field=django_fsm.FSMField(
+ choices=[
+ ("unknown", "Unknown"),
+ ("dns needed", "Dns needed"),
+ ("ready", "Ready"),
+ ("on hold", "On hold"),
+ ("deleted", "Deleted"),
+ ],
+ default="unknown",
+ help_text=" ",
+ max_length=21,
+ protected=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="about_your_organization",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="address_line1",
+ field=models.CharField(blank=True, null=True, verbose_name="Street address"),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="address_line2",
+ field=models.CharField(blank=True, null=True, verbose_name="Street address line 2 (optional)"),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="anything_else",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="city",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="creator",
+ field=models.ForeignKey(
+ help_text="Person who submitted the domain request",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="information_created",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="domain",
+ field=models.OneToOneField(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.CASCADE,
+ related_name="domain_info",
+ to="registrar.domain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="domain_request",
+ field=models.OneToOneField(
+ blank=True,
+ help_text="Request associated with this domain",
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="DomainRequest_info",
+ to="registrar.domainrequest",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="federal_agency",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ (
+ "Administrative Conference of the United States",
+ "Administrative Conference of the United States",
+ ),
+ ("Advisory Council on Historic Preservation", "Advisory Council on Historic Preservation"),
+ ("American Battle Monuments Commission", "American Battle Monuments Commission"),
+ ("AMTRAK", "AMTRAK"),
+ ("Appalachian Regional Commission", "Appalachian Regional Commission"),
+ (
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ ),
+ ("Appraisal Subcommittee", "Appraisal Subcommittee"),
+ ("Architect of the Capitol", "Architect of the Capitol"),
+ ("Armed Forces Retirement Home", "Armed Forces Retirement Home"),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ ),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ ),
+ ("Central Intelligence Agency", "Central Intelligence Agency"),
+ ("Chemical Safety Board", "Chemical Safety Board"),
+ ("Christopher Columbus Fellowship Foundation", "Christopher Columbus Fellowship Foundation"),
+ ("Civil Rights Cold Case Records Review Board", "Civil Rights Cold Case Records Review Board"),
+ (
+ "Commission for the Preservation of America's Heritage Abroad",
+ "Commission for the Preservation of America's Heritage Abroad",
+ ),
+ ("Commission of Fine Arts", "Commission of Fine Arts"),
+ (
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ ),
+ ("Commodity Futures Trading Commission", "Commodity Futures Trading Commission"),
+ ("Congressional Budget Office", "Congressional Budget Office"),
+ ("Consumer Financial Protection Bureau", "Consumer Financial Protection Bureau"),
+ ("Consumer Product Safety Commission", "Consumer Product Safety Commission"),
+ ("Corporation for National & Community Service", "Corporation for National & Community Service"),
+ (
+ "Corporation for National and Community Service",
+ "Corporation for National and Community Service",
+ ),
+ (
+ "Council of Inspectors General on Integrity and Efficiency",
+ "Council of Inspectors General on Integrity and Efficiency",
+ ),
+ ("Court Services and Offender Supervision", "Court Services and Offender Supervision"),
+ ("Cyberspace Solarium Commission", "Cyberspace Solarium Commission"),
+ (
+ "DC Court Services and Offender Supervision Agency",
+ "DC Court Services and Offender Supervision Agency",
+ ),
+ ("DC Pre-trial Services", "DC Pre-trial Services"),
+ ("Defense Nuclear Facilities Safety Board", "Defense Nuclear Facilities Safety Board"),
+ ("Delta Regional Authority", "Delta Regional Authority"),
+ ("Denali Commission", "Denali Commission"),
+ ("Department of Agriculture", "Department of Agriculture"),
+ ("Department of Commerce", "Department of Commerce"),
+ ("Department of Defense", "Department of Defense"),
+ ("Department of Education", "Department of Education"),
+ ("Department of Energy", "Department of Energy"),
+ ("Department of Health and Human Services", "Department of Health and Human Services"),
+ ("Department of Homeland Security", "Department of Homeland Security"),
+ ("Department of Housing and Urban Development", "Department of Housing and Urban Development"),
+ ("Department of Justice", "Department of Justice"),
+ ("Department of Labor", "Department of Labor"),
+ ("Department of State", "Department of State"),
+ ("Department of the Interior", "Department of the Interior"),
+ ("Department of the Treasury", "Department of the Treasury"),
+ ("Department of Transportation", "Department of Transportation"),
+ ("Department of Veterans Affairs", "Department of Veterans Affairs"),
+ ("Director of National Intelligence", "Director of National Intelligence"),
+ ("Dwight D. Eisenhower Memorial Commission", "Dwight D. Eisenhower Memorial Commission"),
+ ("Election Assistance Commission", "Election Assistance Commission"),
+ ("Environmental Protection Agency", "Environmental Protection Agency"),
+ ("Equal Employment Opportunity Commission", "Equal Employment Opportunity Commission"),
+ ("Executive Office of the President", "Executive Office of the President"),
+ ("Export-Import Bank of the United States", "Export-Import Bank of the United States"),
+ ("Export/Import Bank of the U.S.", "Export/Import Bank of the U.S."),
+ ("Farm Credit Administration", "Farm Credit Administration"),
+ ("Farm Credit System Insurance Corporation", "Farm Credit System Insurance Corporation"),
+ ("Federal Communications Commission", "Federal Communications Commission"),
+ ("Federal Deposit Insurance Corporation", "Federal Deposit Insurance Corporation"),
+ ("Federal Election Commission", "Federal Election Commission"),
+ ("Federal Energy Regulatory Commission", "Federal Energy Regulatory Commission"),
+ (
+ "Federal Financial Institutions Examination Council",
+ "Federal Financial Institutions Examination Council",
+ ),
+ ("Federal Housing Finance Agency", "Federal Housing Finance Agency"),
+ ("Federal Judiciary", "Federal Judiciary"),
+ ("Federal Labor Relations Authority", "Federal Labor Relations Authority"),
+ ("Federal Maritime Commission", "Federal Maritime Commission"),
+ ("Federal Mediation and Conciliation Service", "Federal Mediation and Conciliation Service"),
+ (
+ "Federal Mine Safety and Health Review Commission",
+ "Federal Mine Safety and Health Review Commission",
+ ),
+ (
+ "Federal Permitting Improvement Steering Council",
+ "Federal Permitting Improvement Steering Council",
+ ),
+ ("Federal Reserve Board of Governors", "Federal Reserve Board of Governors"),
+ ("Federal Reserve System", "Federal Reserve System"),
+ ("Federal Trade Commission", "Federal Trade Commission"),
+ ("General Services Administration", "General Services Administration"),
+ ("gov Administration", "gov Administration"),
+ ("Government Accountability Office", "Government Accountability Office"),
+ ("Government Publishing Office", "Government Publishing Office"),
+ ("Gulf Coast Ecosystem Restoration Council", "Gulf Coast Ecosystem Restoration Council"),
+ ("Harry S Truman Scholarship Foundation", "Harry S Truman Scholarship Foundation"),
+ ("Harry S. Truman Scholarship Foundation", "Harry S. Truman Scholarship Foundation"),
+ ("Institute of Museum and Library Services", "Institute of Museum and Library Services"),
+ ("Institute of Peace", "Institute of Peace"),
+ ("Inter-American Foundation", "Inter-American Foundation"),
+ (
+ "International Boundary and Water Commission: United States and Mexico",
+ "International Boundary and Water Commission: United States and Mexico",
+ ),
+ (
+ "International Boundary Commission: United States and Canada",
+ "International Boundary Commission: United States and Canada",
+ ),
+ (
+ "International Joint Commission: United States and Canada",
+ "International Joint Commission: United States and Canada",
+ ),
+ ("James Madison Memorial Fellowship Foundation", "James Madison Memorial Fellowship Foundation"),
+ ("Japan-United States Friendship Commission", "Japan-United States Friendship Commission"),
+ ("Japan-US Friendship Commission", "Japan-US Friendship Commission"),
+ ("John F. Kennedy Center for Performing Arts", "John F. Kennedy Center for Performing Arts"),
+ (
+ "John F. Kennedy Center for the Performing Arts",
+ "John F. Kennedy Center for the Performing Arts",
+ ),
+ ("Legal Services Corporation", "Legal Services Corporation"),
+ ("Legislative Branch", "Legislative Branch"),
+ ("Library of Congress", "Library of Congress"),
+ ("Marine Mammal Commission", "Marine Mammal Commission"),
+ (
+ "Medicaid and CHIP Payment and Access Commission",
+ "Medicaid and CHIP Payment and Access Commission",
+ ),
+ ("Medical Payment Advisory Commission", "Medical Payment Advisory Commission"),
+ ("Medicare Payment Advisory Commission", "Medicare Payment Advisory Commission"),
+ ("Merit Systems Protection Board", "Merit Systems Protection Board"),
+ ("Millennium Challenge Corporation", "Millennium Challenge Corporation"),
+ (
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ ),
+ ("National Aeronautics and Space Administration", "National Aeronautics and Space Administration"),
+ ("National Archives and Records Administration", "National Archives and Records Administration"),
+ ("National Capital Planning Commission", "National Capital Planning Commission"),
+ ("National Council on Disability", "National Council on Disability"),
+ ("National Credit Union Administration", "National Credit Union Administration"),
+ ("National Endowment for the Arts", "National Endowment for the Arts"),
+ ("National Endowment for the Humanities", "National Endowment for the Humanities"),
+ (
+ "National Foundation on the Arts and the Humanities",
+ "National Foundation on the Arts and the Humanities",
+ ),
+ ("National Gallery of Art", "National Gallery of Art"),
+ ("National Indian Gaming Commission", "National Indian Gaming Commission"),
+ ("National Labor Relations Board", "National Labor Relations Board"),
+ ("National Mediation Board", "National Mediation Board"),
+ ("National Science Foundation", "National Science Foundation"),
+ (
+ "National Security Commission on Artificial Intelligence",
+ "National Security Commission on Artificial Intelligence",
+ ),
+ ("National Transportation Safety Board", "National Transportation Safety Board"),
+ (
+ "Networking Information Technology Research and Development",
+ "Networking Information Technology Research and Development",
+ ),
+ ("Non-Federal Agency", "Non-Federal Agency"),
+ ("Northern Border Regional Commission", "Northern Border Regional Commission"),
+ ("Nuclear Regulatory Commission", "Nuclear Regulatory Commission"),
+ ("Nuclear Safety Oversight Committee", "Nuclear Safety Oversight Committee"),
+ ("Nuclear Waste Technical Review Board", "Nuclear Waste Technical Review Board"),
+ (
+ "Occupational Safety & Health Review Commission",
+ "Occupational Safety & Health Review Commission",
+ ),
+ (
+ "Occupational Safety and Health Review Commission",
+ "Occupational Safety and Health Review Commission",
+ ),
+ ("Office of Compliance", "Office of Compliance"),
+ ("Office of Congressional Workplace Rights", "Office of Congressional Workplace Rights"),
+ ("Office of Government Ethics", "Office of Government Ethics"),
+ ("Office of Navajo and Hopi Indian Relocation", "Office of Navajo and Hopi Indian Relocation"),
+ ("Office of Personnel Management", "Office of Personnel Management"),
+ ("Open World Leadership Center", "Open World Leadership Center"),
+ ("Overseas Private Investment Corporation", "Overseas Private Investment Corporation"),
+ ("Peace Corps", "Peace Corps"),
+ ("Pension Benefit Guaranty Corporation", "Pension Benefit Guaranty Corporation"),
+ ("Postal Regulatory Commission", "Postal Regulatory Commission"),
+ ("Presidio Trust", "Presidio Trust"),
+ ("Privacy and Civil Liberties Oversight Board", "Privacy and Civil Liberties Oversight Board"),
+ ("Public Buildings Reform Board", "Public Buildings Reform Board"),
+ (
+ "Public Defender Service for the District of Columbia",
+ "Public Defender Service for the District of Columbia",
+ ),
+ ("Railroad Retirement Board", "Railroad Retirement Board"),
+ ("Securities and Exchange Commission", "Securities and Exchange Commission"),
+ ("Selective Service System", "Selective Service System"),
+ ("Small Business Administration", "Small Business Administration"),
+ ("Smithsonian Institution", "Smithsonian Institution"),
+ ("Social Security Administration", "Social Security Administration"),
+ ("Social Security Advisory Board", "Social Security Advisory Board"),
+ ("Southeast Crescent Regional Commission", "Southeast Crescent Regional Commission"),
+ ("Southwest Border Regional Commission", "Southwest Border Regional Commission"),
+ ("State Justice Institute", "State Justice Institute"),
+ ("State, Local, and Tribal Government", "State, Local, and Tribal Government"),
+ ("Stennis Center for Public Service", "Stennis Center for Public Service"),
+ ("Surface Transportation Board", "Surface Transportation Board"),
+ ("Tennessee Valley Authority", "Tennessee Valley Authority"),
+ ("The Executive Office of the President", "The Executive Office of the President"),
+ ("The Intelligence Community", "The Intelligence Community"),
+ ("The Legislative Branch", "The Legislative Branch"),
+ ("The Supreme Court", "The Supreme Court"),
+ (
+ "The United States World War One Centennial Commission",
+ "The United States World War One Centennial Commission",
+ ),
+ ("U.S. Access Board", "U.S. Access Board"),
+ ("U.S. Agency for Global Media", "U.S. Agency for Global Media"),
+ ("U.S. Agency for International Development", "U.S. Agency for International Development"),
+ ("U.S. Capitol Police", "U.S. Capitol Police"),
+ ("U.S. Chemical Safety Board", "U.S. Chemical Safety Board"),
+ (
+ "U.S. China Economic and Security Review Commission",
+ "U.S. China Economic and Security Review Commission",
+ ),
+ (
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ ),
+ ("U.S. Commission of Fine Arts", "U.S. Commission of Fine Arts"),
+ ("U.S. Commission on Civil Rights", "U.S. Commission on Civil Rights"),
+ (
+ "U.S. Commission on International Religious Freedom",
+ "U.S. Commission on International Religious Freedom",
+ ),
+ ("U.S. Courts", "U.S. Courts"),
+ ("U.S. Department of Agriculture", "U.S. Department of Agriculture"),
+ ("U.S. Interagency Council on Homelessness", "U.S. Interagency Council on Homelessness"),
+ ("U.S. International Trade Commission", "U.S. International Trade Commission"),
+ ("U.S. Nuclear Waste Technical Review Board", "U.S. Nuclear Waste Technical Review Board"),
+ ("U.S. Office of Special Counsel", "U.S. Office of Special Counsel"),
+ ("U.S. Peace Corps", "U.S. Peace Corps"),
+ ("U.S. Postal Service", "U.S. Postal Service"),
+ ("U.S. Semiquincentennial Commission", "U.S. Semiquincentennial Commission"),
+ ("U.S. Trade and Development Agency", "U.S. Trade and Development Agency"),
+ (
+ "U.S.-China Economic and Security Review Commission",
+ "U.S.-China Economic and Security Review Commission",
+ ),
+ ("Udall Foundation", "Udall Foundation"),
+ ("United States AbilityOne", "United States AbilityOne"),
+ ("United States Access Board", "United States Access Board"),
+ ("United States African Development Foundation", "United States African Development Foundation"),
+ ("United States Agency for Global Media", "United States Agency for Global Media"),
+ ("United States Arctic Research Commission", "United States Arctic Research Commission"),
+ ("United States Global Change Research Program", "United States Global Change Research Program"),
+ ("United States Holocaust Memorial Museum", "United States Holocaust Memorial Museum"),
+ ("United States Institute of Peace", "United States Institute of Peace"),
+ (
+ "United States Interagency Council on Homelessness",
+ "United States Interagency Council on Homelessness",
+ ),
+ (
+ "United States International Development Finance Corporation",
+ "United States International Development Finance Corporation",
+ ),
+ ("United States International Trade Commission", "United States International Trade Commission"),
+ ("United States Postal Service", "United States Postal Service"),
+ ("United States Senate", "United States Senate"),
+ ("United States Trade and Development Agency", "United States Trade and Development Agency"),
+ (
+ "Utah Reclamation Mitigation and Conservation Commission",
+ "Utah Reclamation Mitigation and Conservation Commission",
+ ),
+ ("Vietnam Education Foundation", "Vietnam Education Foundation"),
+ ("Western Hemisphere Drug Policy Commission", "Western Hemisphere Drug Policy Commission"),
+ (
+ "Woodrow Wilson International Center for Scholars",
+ "Woodrow Wilson International Center for Scholars",
+ ),
+ ("World War I Centennial Commission", "World War I Centennial Commission"),
+ ],
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="federal_type",
+ field=models.CharField(
+ blank=True,
+ choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
+ max_length=50,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="federally_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="no_other_contacts_rationale",
+ field=models.TextField(
+ blank=True, help_text="Required if creator does not list other employees", null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="notes",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="organization_name",
+ field=models.CharField(blank=True, db_index=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="state_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="state_territory",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("AL", "Alabama (AL)"),
+ ("AK", "Alaska (AK)"),
+ ("AS", "American Samoa (AS)"),
+ ("AZ", "Arizona (AZ)"),
+ ("AR", "Arkansas (AR)"),
+ ("CA", "California (CA)"),
+ ("CO", "Colorado (CO)"),
+ ("CT", "Connecticut (CT)"),
+ ("DE", "Delaware (DE)"),
+ ("DC", "District of Columbia (DC)"),
+ ("FL", "Florida (FL)"),
+ ("GA", "Georgia (GA)"),
+ ("GU", "Guam (GU)"),
+ ("HI", "Hawaii (HI)"),
+ ("ID", "Idaho (ID)"),
+ ("IL", "Illinois (IL)"),
+ ("IN", "Indiana (IN)"),
+ ("IA", "Iowa (IA)"),
+ ("KS", "Kansas (KS)"),
+ ("KY", "Kentucky (KY)"),
+ ("LA", "Louisiana (LA)"),
+ ("ME", "Maine (ME)"),
+ ("MD", "Maryland (MD)"),
+ ("MA", "Massachusetts (MA)"),
+ ("MI", "Michigan (MI)"),
+ ("MN", "Minnesota (MN)"),
+ ("MS", "Mississippi (MS)"),
+ ("MO", "Missouri (MO)"),
+ ("MT", "Montana (MT)"),
+ ("NE", "Nebraska (NE)"),
+ ("NV", "Nevada (NV)"),
+ ("NH", "New Hampshire (NH)"),
+ ("NJ", "New Jersey (NJ)"),
+ ("NM", "New Mexico (NM)"),
+ ("NY", "New York (NY)"),
+ ("NC", "North Carolina (NC)"),
+ ("ND", "North Dakota (ND)"),
+ ("MP", "Northern Mariana Islands (MP)"),
+ ("OH", "Ohio (OH)"),
+ ("OK", "Oklahoma (OK)"),
+ ("OR", "Oregon (OR)"),
+ ("PA", "Pennsylvania (PA)"),
+ ("PR", "Puerto Rico (PR)"),
+ ("RI", "Rhode Island (RI)"),
+ ("SC", "South Carolina (SC)"),
+ ("SD", "South Dakota (SD)"),
+ ("TN", "Tennessee (TN)"),
+ ("TX", "Texas (TX)"),
+ ("UM", "United States Minor Outlying Islands (UM)"),
+ ("UT", "Utah (UT)"),
+ ("VT", "Vermont (VT)"),
+ ("VI", "Virgin Islands (VI)"),
+ ("VA", "Virginia (VA)"),
+ ("WA", "Washington (WA)"),
+ ("WV", "West Virginia (WV)"),
+ ("WI", "Wisconsin (WI)"),
+ ("WY", "Wyoming (WY)"),
+ ("AA", "Armed Forces Americas (AA)"),
+ ("AE", "Armed Forces Africa, Canada, Europe, Middle East (AE)"),
+ ("AP", "Armed Forces Pacific (AP)"),
+ ],
+ max_length=2,
+ null=True,
+ verbose_name="State, territory, or military post",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="submitter",
+ field=models.ForeignKey(
+ blank=True,
+ help_text='Person listed under "your contact information" in the request form',
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="submitted_domain_requests_information",
+ to="registrar.contact",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="tribe_name",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="urbanization",
+ field=models.CharField(
+ blank=True,
+ help_text="Required for Puerto Rico only",
+ null=True,
+ verbose_name="Urbanization (required for Puerto Rico only)",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="zipcode",
+ field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="about_your_organization",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="address_line1",
+ field=models.CharField(blank=True, null=True, verbose_name="Address line 1"),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="address_line2",
+ field=models.CharField(blank=True, null=True, verbose_name="Address line 2"),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="alternative_domains",
+ field=models.ManyToManyField(
+ blank=True,
+ help_text="Other domain names the creator provided for consideration",
+ related_name="alternatives+",
+ to="registrar.website",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="anything_else",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="approved_domain",
+ field=models.OneToOneField(
+ blank=True,
+ help_text="Domain associated with this request; will be blank until request is approved",
+ null=True,
+ on_delete=django.db.models.deletion.SET_NULL,
+ related_name="domain_request",
+ to="registrar.domain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="city",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="creator",
+ field=models.ForeignKey(
+ help_text="Person who submitted the domain request; will not receive email updates",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="domain_requests_created",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="federal_agency",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ (
+ "Administrative Conference of the United States",
+ "Administrative Conference of the United States",
+ ),
+ ("Advisory Council on Historic Preservation", "Advisory Council on Historic Preservation"),
+ ("American Battle Monuments Commission", "American Battle Monuments Commission"),
+ ("AMTRAK", "AMTRAK"),
+ ("Appalachian Regional Commission", "Appalachian Regional Commission"),
+ (
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ "Appraisal Subcommittee of the Federal Financial Institutions Examination Council",
+ ),
+ ("Appraisal Subcommittee", "Appraisal Subcommittee"),
+ ("Architect of the Capitol", "Architect of the Capitol"),
+ ("Armed Forces Retirement Home", "Armed Forces Retirement Home"),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ "Barry Goldwater Scholarship and Excellence in Education Foundation",
+ ),
+ (
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ "Barry Goldwater Scholarship and Excellence in Education Program",
+ ),
+ ("Central Intelligence Agency", "Central Intelligence Agency"),
+ ("Chemical Safety Board", "Chemical Safety Board"),
+ ("Christopher Columbus Fellowship Foundation", "Christopher Columbus Fellowship Foundation"),
+ ("Civil Rights Cold Case Records Review Board", "Civil Rights Cold Case Records Review Board"),
+ (
+ "Commission for the Preservation of America's Heritage Abroad",
+ "Commission for the Preservation of America's Heritage Abroad",
+ ),
+ ("Commission of Fine Arts", "Commission of Fine Arts"),
+ (
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ "Committee for Purchase From People Who Are Blind or Severely Disabled",
+ ),
+ ("Commodity Futures Trading Commission", "Commodity Futures Trading Commission"),
+ ("Congressional Budget Office", "Congressional Budget Office"),
+ ("Consumer Financial Protection Bureau", "Consumer Financial Protection Bureau"),
+ ("Consumer Product Safety Commission", "Consumer Product Safety Commission"),
+ ("Corporation for National & Community Service", "Corporation for National & Community Service"),
+ (
+ "Corporation for National and Community Service",
+ "Corporation for National and Community Service",
+ ),
+ (
+ "Council of Inspectors General on Integrity and Efficiency",
+ "Council of Inspectors General on Integrity and Efficiency",
+ ),
+ ("Court Services and Offender Supervision", "Court Services and Offender Supervision"),
+ ("Cyberspace Solarium Commission", "Cyberspace Solarium Commission"),
+ (
+ "DC Court Services and Offender Supervision Agency",
+ "DC Court Services and Offender Supervision Agency",
+ ),
+ ("DC Pre-trial Services", "DC Pre-trial Services"),
+ ("Defense Nuclear Facilities Safety Board", "Defense Nuclear Facilities Safety Board"),
+ ("Delta Regional Authority", "Delta Regional Authority"),
+ ("Denali Commission", "Denali Commission"),
+ ("Department of Agriculture", "Department of Agriculture"),
+ ("Department of Commerce", "Department of Commerce"),
+ ("Department of Defense", "Department of Defense"),
+ ("Department of Education", "Department of Education"),
+ ("Department of Energy", "Department of Energy"),
+ ("Department of Health and Human Services", "Department of Health and Human Services"),
+ ("Department of Homeland Security", "Department of Homeland Security"),
+ ("Department of Housing and Urban Development", "Department of Housing and Urban Development"),
+ ("Department of Justice", "Department of Justice"),
+ ("Department of Labor", "Department of Labor"),
+ ("Department of State", "Department of State"),
+ ("Department of the Interior", "Department of the Interior"),
+ ("Department of the Treasury", "Department of the Treasury"),
+ ("Department of Transportation", "Department of Transportation"),
+ ("Department of Veterans Affairs", "Department of Veterans Affairs"),
+ ("Director of National Intelligence", "Director of National Intelligence"),
+ ("Dwight D. Eisenhower Memorial Commission", "Dwight D. Eisenhower Memorial Commission"),
+ ("Election Assistance Commission", "Election Assistance Commission"),
+ ("Environmental Protection Agency", "Environmental Protection Agency"),
+ ("Equal Employment Opportunity Commission", "Equal Employment Opportunity Commission"),
+ ("Executive Office of the President", "Executive Office of the President"),
+ ("Export-Import Bank of the United States", "Export-Import Bank of the United States"),
+ ("Export/Import Bank of the U.S.", "Export/Import Bank of the U.S."),
+ ("Farm Credit Administration", "Farm Credit Administration"),
+ ("Farm Credit System Insurance Corporation", "Farm Credit System Insurance Corporation"),
+ ("Federal Communications Commission", "Federal Communications Commission"),
+ ("Federal Deposit Insurance Corporation", "Federal Deposit Insurance Corporation"),
+ ("Federal Election Commission", "Federal Election Commission"),
+ ("Federal Energy Regulatory Commission", "Federal Energy Regulatory Commission"),
+ (
+ "Federal Financial Institutions Examination Council",
+ "Federal Financial Institutions Examination Council",
+ ),
+ ("Federal Housing Finance Agency", "Federal Housing Finance Agency"),
+ ("Federal Judiciary", "Federal Judiciary"),
+ ("Federal Labor Relations Authority", "Federal Labor Relations Authority"),
+ ("Federal Maritime Commission", "Federal Maritime Commission"),
+ ("Federal Mediation and Conciliation Service", "Federal Mediation and Conciliation Service"),
+ (
+ "Federal Mine Safety and Health Review Commission",
+ "Federal Mine Safety and Health Review Commission",
+ ),
+ (
+ "Federal Permitting Improvement Steering Council",
+ "Federal Permitting Improvement Steering Council",
+ ),
+ ("Federal Reserve Board of Governors", "Federal Reserve Board of Governors"),
+ ("Federal Reserve System", "Federal Reserve System"),
+ ("Federal Trade Commission", "Federal Trade Commission"),
+ ("General Services Administration", "General Services Administration"),
+ ("gov Administration", "gov Administration"),
+ ("Government Accountability Office", "Government Accountability Office"),
+ ("Government Publishing Office", "Government Publishing Office"),
+ ("Gulf Coast Ecosystem Restoration Council", "Gulf Coast Ecosystem Restoration Council"),
+ ("Harry S Truman Scholarship Foundation", "Harry S Truman Scholarship Foundation"),
+ ("Harry S. Truman Scholarship Foundation", "Harry S. Truman Scholarship Foundation"),
+ ("Institute of Museum and Library Services", "Institute of Museum and Library Services"),
+ ("Institute of Peace", "Institute of Peace"),
+ ("Inter-American Foundation", "Inter-American Foundation"),
+ (
+ "International Boundary and Water Commission: United States and Mexico",
+ "International Boundary and Water Commission: United States and Mexico",
+ ),
+ (
+ "International Boundary Commission: United States and Canada",
+ "International Boundary Commission: United States and Canada",
+ ),
+ (
+ "International Joint Commission: United States and Canada",
+ "International Joint Commission: United States and Canada",
+ ),
+ ("James Madison Memorial Fellowship Foundation", "James Madison Memorial Fellowship Foundation"),
+ ("Japan-United States Friendship Commission", "Japan-United States Friendship Commission"),
+ ("Japan-US Friendship Commission", "Japan-US Friendship Commission"),
+ ("John F. Kennedy Center for Performing Arts", "John F. Kennedy Center for Performing Arts"),
+ (
+ "John F. Kennedy Center for the Performing Arts",
+ "John F. Kennedy Center for the Performing Arts",
+ ),
+ ("Legal Services Corporation", "Legal Services Corporation"),
+ ("Legislative Branch", "Legislative Branch"),
+ ("Library of Congress", "Library of Congress"),
+ ("Marine Mammal Commission", "Marine Mammal Commission"),
+ (
+ "Medicaid and CHIP Payment and Access Commission",
+ "Medicaid and CHIP Payment and Access Commission",
+ ),
+ ("Medical Payment Advisory Commission", "Medical Payment Advisory Commission"),
+ ("Medicare Payment Advisory Commission", "Medicare Payment Advisory Commission"),
+ ("Merit Systems Protection Board", "Merit Systems Protection Board"),
+ ("Millennium Challenge Corporation", "Millennium Challenge Corporation"),
+ (
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ "Morris K. Udall and Stewart L. Udall Foundation",
+ ),
+ ("National Aeronautics and Space Administration", "National Aeronautics and Space Administration"),
+ ("National Archives and Records Administration", "National Archives and Records Administration"),
+ ("National Capital Planning Commission", "National Capital Planning Commission"),
+ ("National Council on Disability", "National Council on Disability"),
+ ("National Credit Union Administration", "National Credit Union Administration"),
+ ("National Endowment for the Arts", "National Endowment for the Arts"),
+ ("National Endowment for the Humanities", "National Endowment for the Humanities"),
+ (
+ "National Foundation on the Arts and the Humanities",
+ "National Foundation on the Arts and the Humanities",
+ ),
+ ("National Gallery of Art", "National Gallery of Art"),
+ ("National Indian Gaming Commission", "National Indian Gaming Commission"),
+ ("National Labor Relations Board", "National Labor Relations Board"),
+ ("National Mediation Board", "National Mediation Board"),
+ ("National Science Foundation", "National Science Foundation"),
+ (
+ "National Security Commission on Artificial Intelligence",
+ "National Security Commission on Artificial Intelligence",
+ ),
+ ("National Transportation Safety Board", "National Transportation Safety Board"),
+ (
+ "Networking Information Technology Research and Development",
+ "Networking Information Technology Research and Development",
+ ),
+ ("Non-Federal Agency", "Non-Federal Agency"),
+ ("Northern Border Regional Commission", "Northern Border Regional Commission"),
+ ("Nuclear Regulatory Commission", "Nuclear Regulatory Commission"),
+ ("Nuclear Safety Oversight Committee", "Nuclear Safety Oversight Committee"),
+ ("Nuclear Waste Technical Review Board", "Nuclear Waste Technical Review Board"),
+ (
+ "Occupational Safety & Health Review Commission",
+ "Occupational Safety & Health Review Commission",
+ ),
+ (
+ "Occupational Safety and Health Review Commission",
+ "Occupational Safety and Health Review Commission",
+ ),
+ ("Office of Compliance", "Office of Compliance"),
+ ("Office of Congressional Workplace Rights", "Office of Congressional Workplace Rights"),
+ ("Office of Government Ethics", "Office of Government Ethics"),
+ ("Office of Navajo and Hopi Indian Relocation", "Office of Navajo and Hopi Indian Relocation"),
+ ("Office of Personnel Management", "Office of Personnel Management"),
+ ("Open World Leadership Center", "Open World Leadership Center"),
+ ("Overseas Private Investment Corporation", "Overseas Private Investment Corporation"),
+ ("Peace Corps", "Peace Corps"),
+ ("Pension Benefit Guaranty Corporation", "Pension Benefit Guaranty Corporation"),
+ ("Postal Regulatory Commission", "Postal Regulatory Commission"),
+ ("Presidio Trust", "Presidio Trust"),
+ ("Privacy and Civil Liberties Oversight Board", "Privacy and Civil Liberties Oversight Board"),
+ ("Public Buildings Reform Board", "Public Buildings Reform Board"),
+ (
+ "Public Defender Service for the District of Columbia",
+ "Public Defender Service for the District of Columbia",
+ ),
+ ("Railroad Retirement Board", "Railroad Retirement Board"),
+ ("Securities and Exchange Commission", "Securities and Exchange Commission"),
+ ("Selective Service System", "Selective Service System"),
+ ("Small Business Administration", "Small Business Administration"),
+ ("Smithsonian Institution", "Smithsonian Institution"),
+ ("Social Security Administration", "Social Security Administration"),
+ ("Social Security Advisory Board", "Social Security Advisory Board"),
+ ("Southeast Crescent Regional Commission", "Southeast Crescent Regional Commission"),
+ ("Southwest Border Regional Commission", "Southwest Border Regional Commission"),
+ ("State Justice Institute", "State Justice Institute"),
+ ("State, Local, and Tribal Government", "State, Local, and Tribal Government"),
+ ("Stennis Center for Public Service", "Stennis Center for Public Service"),
+ ("Surface Transportation Board", "Surface Transportation Board"),
+ ("Tennessee Valley Authority", "Tennessee Valley Authority"),
+ ("The Executive Office of the President", "The Executive Office of the President"),
+ ("The Intelligence Community", "The Intelligence Community"),
+ ("The Legislative Branch", "The Legislative Branch"),
+ ("The Supreme Court", "The Supreme Court"),
+ (
+ "The United States World War One Centennial Commission",
+ "The United States World War One Centennial Commission",
+ ),
+ ("U.S. Access Board", "U.S. Access Board"),
+ ("U.S. Agency for Global Media", "U.S. Agency for Global Media"),
+ ("U.S. Agency for International Development", "U.S. Agency for International Development"),
+ ("U.S. Capitol Police", "U.S. Capitol Police"),
+ ("U.S. Chemical Safety Board", "U.S. Chemical Safety Board"),
+ (
+ "U.S. China Economic and Security Review Commission",
+ "U.S. China Economic and Security Review Commission",
+ ),
+ (
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ "U.S. Commission for the Preservation of Americas Heritage Abroad",
+ ),
+ ("U.S. Commission of Fine Arts", "U.S. Commission of Fine Arts"),
+ ("U.S. Commission on Civil Rights", "U.S. Commission on Civil Rights"),
+ (
+ "U.S. Commission on International Religious Freedom",
+ "U.S. Commission on International Religious Freedom",
+ ),
+ ("U.S. Courts", "U.S. Courts"),
+ ("U.S. Department of Agriculture", "U.S. Department of Agriculture"),
+ ("U.S. Interagency Council on Homelessness", "U.S. Interagency Council on Homelessness"),
+ ("U.S. International Trade Commission", "U.S. International Trade Commission"),
+ ("U.S. Nuclear Waste Technical Review Board", "U.S. Nuclear Waste Technical Review Board"),
+ ("U.S. Office of Special Counsel", "U.S. Office of Special Counsel"),
+ ("U.S. Peace Corps", "U.S. Peace Corps"),
+ ("U.S. Postal Service", "U.S. Postal Service"),
+ ("U.S. Semiquincentennial Commission", "U.S. Semiquincentennial Commission"),
+ ("U.S. Trade and Development Agency", "U.S. Trade and Development Agency"),
+ (
+ "U.S.-China Economic and Security Review Commission",
+ "U.S.-China Economic and Security Review Commission",
+ ),
+ ("Udall Foundation", "Udall Foundation"),
+ ("United States AbilityOne", "United States AbilityOne"),
+ ("United States Access Board", "United States Access Board"),
+ ("United States African Development Foundation", "United States African Development Foundation"),
+ ("United States Agency for Global Media", "United States Agency for Global Media"),
+ ("United States Arctic Research Commission", "United States Arctic Research Commission"),
+ ("United States Global Change Research Program", "United States Global Change Research Program"),
+ ("United States Holocaust Memorial Museum", "United States Holocaust Memorial Museum"),
+ ("United States Institute of Peace", "United States Institute of Peace"),
+ (
+ "United States Interagency Council on Homelessness",
+ "United States Interagency Council on Homelessness",
+ ),
+ (
+ "United States International Development Finance Corporation",
+ "United States International Development Finance Corporation",
+ ),
+ ("United States International Trade Commission", "United States International Trade Commission"),
+ ("United States Postal Service", "United States Postal Service"),
+ ("United States Senate", "United States Senate"),
+ ("United States Trade and Development Agency", "United States Trade and Development Agency"),
+ (
+ "Utah Reclamation Mitigation and Conservation Commission",
+ "Utah Reclamation Mitigation and Conservation Commission",
+ ),
+ ("Vietnam Education Foundation", "Vietnam Education Foundation"),
+ ("Western Hemisphere Drug Policy Commission", "Western Hemisphere Drug Policy Commission"),
+ (
+ "Woodrow Wilson International Center for Scholars",
+ "Woodrow Wilson International Center for Scholars",
+ ),
+ ("World War I Centennial Commission", "World War I Centennial Commission"),
+ ],
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="federal_type",
+ field=models.CharField(
+ blank=True,
+ choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
+ max_length=50,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="federally_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="generic_org_type",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("federal", "Federal"),
+ ("interstate", "Interstate"),
+ ("state_or_territory", "State or territory"),
+ ("tribal", "Tribal"),
+ ("county", "County"),
+ ("city", "City"),
+ ("special_district", "Special district"),
+ ("school_district", "School district"),
+ ],
+ max_length=255,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="is_election_board",
+ field=models.BooleanField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="no_other_contacts_rationale",
+ field=models.TextField(
+ blank=True, help_text="Required if creator does not list other employees", null=True
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="notes",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="organization_name",
+ field=models.CharField(blank=True, db_index=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="purpose",
+ field=models.TextField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="requested_domain",
+ field=models.OneToOneField(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="domain_request",
+ to="registrar.draftdomain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="state_recognized_tribe",
+ field=models.BooleanField(null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="state_territory",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("AL", "Alabama (AL)"),
+ ("AK", "Alaska (AK)"),
+ ("AS", "American Samoa (AS)"),
+ ("AZ", "Arizona (AZ)"),
+ ("AR", "Arkansas (AR)"),
+ ("CA", "California (CA)"),
+ ("CO", "Colorado (CO)"),
+ ("CT", "Connecticut (CT)"),
+ ("DE", "Delaware (DE)"),
+ ("DC", "District of Columbia (DC)"),
+ ("FL", "Florida (FL)"),
+ ("GA", "Georgia (GA)"),
+ ("GU", "Guam (GU)"),
+ ("HI", "Hawaii (HI)"),
+ ("ID", "Idaho (ID)"),
+ ("IL", "Illinois (IL)"),
+ ("IN", "Indiana (IN)"),
+ ("IA", "Iowa (IA)"),
+ ("KS", "Kansas (KS)"),
+ ("KY", "Kentucky (KY)"),
+ ("LA", "Louisiana (LA)"),
+ ("ME", "Maine (ME)"),
+ ("MD", "Maryland (MD)"),
+ ("MA", "Massachusetts (MA)"),
+ ("MI", "Michigan (MI)"),
+ ("MN", "Minnesota (MN)"),
+ ("MS", "Mississippi (MS)"),
+ ("MO", "Missouri (MO)"),
+ ("MT", "Montana (MT)"),
+ ("NE", "Nebraska (NE)"),
+ ("NV", "Nevada (NV)"),
+ ("NH", "New Hampshire (NH)"),
+ ("NJ", "New Jersey (NJ)"),
+ ("NM", "New Mexico (NM)"),
+ ("NY", "New York (NY)"),
+ ("NC", "North Carolina (NC)"),
+ ("ND", "North Dakota (ND)"),
+ ("MP", "Northern Mariana Islands (MP)"),
+ ("OH", "Ohio (OH)"),
+ ("OK", "Oklahoma (OK)"),
+ ("OR", "Oregon (OR)"),
+ ("PA", "Pennsylvania (PA)"),
+ ("PR", "Puerto Rico (PR)"),
+ ("RI", "Rhode Island (RI)"),
+ ("SC", "South Carolina (SC)"),
+ ("SD", "South Dakota (SD)"),
+ ("TN", "Tennessee (TN)"),
+ ("TX", "Texas (TX)"),
+ ("UM", "United States Minor Outlying Islands (UM)"),
+ ("UT", "Utah (UT)"),
+ ("VT", "Vermont (VT)"),
+ ("VI", "Virgin Islands (VI)"),
+ ("VA", "Virginia (VA)"),
+ ("WA", "Washington (WA)"),
+ ("WV", "West Virginia (WV)"),
+ ("WI", "Wisconsin (WI)"),
+ ("WY", "Wyoming (WY)"),
+ ("AA", "Armed Forces Americas (AA)"),
+ ("AE", "Armed Forces Africa, Canada, Europe, Middle East (AE)"),
+ ("AP", "Armed Forces Pacific (AP)"),
+ ],
+ max_length=2,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="submitter",
+ field=models.ForeignKey(
+ blank=True,
+ help_text='Person listed under "your contact information" in the request form; will receive email updates',
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="submitted_domain_requests",
+ to="registrar.contact",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="tribe_name",
+ field=models.CharField(blank=True, null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="urbanization",
+ field=models.CharField(blank=True, help_text="Required for Puerto Rico only", null=True),
+ ),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="zipcode",
+ field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
+ ),
+ migrations.AlterField(
+ model_name="host",
+ name="domain",
+ field=models.ForeignKey(
+ help_text="Domain associated with this host",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="host",
+ to="registrar.domain",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="host",
+ name="name",
+ field=models.CharField(default=None, max_length=253),
+ ),
+ migrations.AlterField(
+ model_name="hostip",
+ name="address",
+ field=models.CharField(
+ default=None, max_length=46, validators=[django.core.validators.validate_ipv46_address]
+ ),
+ ),
+ migrations.AlterField(
+ model_name="hostip",
+ name="host",
+ field=models.ForeignKey(
+ help_text="IP associated with this host",
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="ip",
+ to="registrar.host",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="user",
+ name="status",
+ field=models.CharField(
+ blank=True,
+ choices=[("restricted", "restricted")],
+ default=None,
+ help_text='Users in "restricted" status cannot make updates in the registrar or start a new request.',
+ max_length=10,
+ null=True,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="verifiedbystaff",
+ name="email",
+ field=models.EmailField(db_index=True, max_length=254),
+ ),
+ migrations.AlterField(
+ model_name="verifiedbystaff",
+ name="notes",
+ field=models.TextField(),
+ ),
+ migrations.AlterField(
+ model_name="verifiedbystaff",
+ name="requestor",
+ field=models.ForeignKey(
+ blank=True,
+ help_text="Person who verified this user",
+ null=True,
+ on_delete=django.db.models.deletion.SET_NULL,
+ related_name="verifiedby_user",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ migrations.AlterField(
+ model_name="website",
+ name="website",
+ field=models.CharField(
+ help_text="An alternative domain or current website listed on a domain request", max_length=255
+ ),
+ ),
+ ]
From a7f0340c523ec402f5a6a392c1ed55f400751b79 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 22 Apr 2024 14:41:04 -0600
Subject: [PATCH 15/31] Add some spacing
---
src/registrar/models/domain.py | 1 -
.../templates/django/admin/includes/detail_table_fieldset.html | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index 89bf3b7d9d..f0cfaa9bf1 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -163,7 +163,6 @@ def get_help_text(cls, state) -> str:
def get_admin_help_text(cls, state):
"""Returns a help message for a desired state for /admin. If none is found, an empty string is returned"""
admin_help_texts = {
- # For now, unknown has the same message as DNS_NEEDED
cls.UNKNOWN: (
"The creator of the associated domain request has not logged in to "
"manage the domain since it was approved. "
diff --git a/src/registrar/templates/django/admin/includes/detail_table_fieldset.html b/src/registrar/templates/django/admin/includes/detail_table_fieldset.html
index f346ee1551..9199f84cc8 100644
--- a/src/registrar/templates/django/admin/includes/detail_table_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/detail_table_fieldset.html
@@ -67,7 +67,7 @@
{% block after_help_text %}
{% if field.field.name == "creator" %}
-
+
{% include "django/admin/includes/contact_detail_list.html" with user=original.creator no_title_top_padding=field.is_readonly %}
From d82c21feb12d64dfa2f2c1f17592d494a5f183c8 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 22 Apr 2024 15:15:02 -0600
Subject: [PATCH 16/31] Update migrations
---
..._alter_domain_expiration_date_and_more.py} | 43 ++++++++++---------
1 file changed, 22 insertions(+), 21 deletions(-)
rename src/registrar/migrations/{0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py => 0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py} (98%)
diff --git a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py b/src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py
similarity index 98%
rename from src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
rename to src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py
index 3590d3869a..c3f6f7bffd 100644
--- a/src/registrar/migrations/0085_alter_domain_deleted_alter_domain_expiration_date_and_more.py
+++ b/src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py
@@ -1,17 +1,16 @@
-# Generated by Django 4.2.10 on 2024-04-16 16:17
+# Generated by Django 4.2.10 on 2024-04-22 21:14
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django_fsm
-import registrar.models.utility.domain_field
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0084_create_groups_v11"),
+ ("registrar", "0086_domaininformation_updated_federal_agency_and_more"),
]
operations = [
@@ -19,7 +18,10 @@ class Migration(migrations.Migration):
model_name="domain",
name="deleted",
field=models.DateField(
- editable=False, help_text='Will appear blank unless the domain is in "deleted" state', null=True
+ editable=False,
+ help_text='Will appear blank unless the domain is in "deleted" state',
+ null=True,
+ verbose_name="deleted on",
),
),
migrations.AlterField(
@@ -34,13 +36,9 @@ class Migration(migrations.Migration):
editable=False,
help_text='Date when this domain first moved into "ready" state; date will never change',
null=True,
+ verbose_name="first ready on",
),
),
- migrations.AlterField(
- model_name="domain",
- name="name",
- field=registrar.models.utility.domain_field.DomainField(default=None, max_length=253, unique=True),
- ),
migrations.AlterField(
model_name="domain",
name="state",
@@ -56,6 +54,7 @@ class Migration(migrations.Migration):
help_text=" ",
max_length=21,
protected=True,
+ verbose_name="domain state",
),
),
migrations.AlterField(
@@ -66,12 +65,12 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="domaininformation",
name="address_line1",
- field=models.CharField(blank=True, null=True, verbose_name="Street address"),
+ field=models.CharField(blank=True, null=True, verbose_name="address line 1"),
),
migrations.AlterField(
model_name="domaininformation",
name="address_line2",
- field=models.CharField(blank=True, null=True, verbose_name="Street address line 2 (optional)"),
+ field=models.CharField(blank=True, null=True, verbose_name="address line 2"),
),
migrations.AlterField(
model_name="domaininformation",
@@ -528,7 +527,7 @@ class Migration(migrations.Migration):
],
max_length=2,
null=True,
- verbose_name="State, territory, or military post",
+ verbose_name="state / territory",
),
),
migrations.AlterField(
@@ -552,16 +551,13 @@ class Migration(migrations.Migration):
model_name="domaininformation",
name="urbanization",
field=models.CharField(
- blank=True,
- help_text="Required for Puerto Rico only",
- null=True,
- verbose_name="Urbanization (required for Puerto Rico only)",
+ blank=True, help_text="Required for Puerto Rico only", null=True, verbose_name="urbanization"
),
),
migrations.AlterField(
model_name="domaininformation",
name="zipcode",
- field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
+ field=models.CharField(blank=True, db_index=True, max_length=10, null=True, verbose_name="zip code"),
),
migrations.AlterField(
model_name="domainrequest",
@@ -963,7 +959,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="domainrequest",
name="is_election_board",
- field=models.BooleanField(blank=True, null=True),
+ field=models.BooleanField(blank=True, null=True, verbose_name="election office"),
),
migrations.AlterField(
model_name="domainrequest",
@@ -1072,6 +1068,7 @@ class Migration(migrations.Migration):
],
max_length=2,
null=True,
+ verbose_name="state / territory",
),
),
migrations.AlterField(
@@ -1099,7 +1096,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="domainrequest",
name="zipcode",
- field=models.CharField(blank=True, db_index=True, max_length=10, null=True),
+ field=models.CharField(blank=True, db_index=True, max_length=10, null=True, verbose_name="zip code"),
),
migrations.AlterField(
model_name="host",
@@ -1114,13 +1111,16 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name="host",
name="name",
- field=models.CharField(default=None, max_length=253),
+ field=models.CharField(default=None, max_length=253, verbose_name="host name"),
),
migrations.AlterField(
model_name="hostip",
name="address",
field=models.CharField(
- default=None, max_length=46, validators=[django.core.validators.validate_ipv46_address]
+ default=None,
+ max_length=46,
+ validators=[django.core.validators.validate_ipv46_address],
+ verbose_name="IP address",
),
),
migrations.AlterField(
@@ -1143,6 +1143,7 @@ class Migration(migrations.Migration):
help_text='Users in "restricted" status cannot make updates in the registrar or start a new request.',
max_length=10,
null=True,
+ verbose_name="user status",
),
),
migrations.AlterField(
From 788a190a444cccfac7b6fb028215d50547ee469f Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Mon, 22 Apr 2024 15:32:27 -0600
Subject: [PATCH 17/31] linting
---
src/registrar/tests/test_admin.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index bc45f661e9..19783b3f24 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -33,8 +33,6 @@
PublicContact,
Host,
Website,
- DraftDomain,
- Host,
)
from registrar.models.user_domain_role import UserDomainRole
from registrar.models.verified_by_staff import VerifiedByStaff
From 42d2eb3ccdc53a71c31091cdbc76c4c43b394357 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 08:19:13 -0600
Subject: [PATCH 18/31] Fix field helper text
---
src/registrar/models/domain_information.py | 3 +--
src/registrar/models/domain_request.py | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index bf964be619..31b0ca6070 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -82,7 +82,7 @@ class DomainInformation(TimeStampedModel):
choices=DomainRequest.OrgChoicesElectionOffice.choices,
null=True,
blank=True,
- help_text="Type of organization - Election office",
+ help_text="\"Election\" appears after the org type if it's an election office.",
)
federally_recognized_tribe = models.BooleanField(
@@ -115,7 +115,6 @@ class DomainInformation(TimeStampedModel):
null=True,
blank=True,
verbose_name="election office",
- help_text="Is your organization an election office?",
)
organization_name = models.CharField(
diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py
index d9f411be73..f775e58124 100644
--- a/src/registrar/models/domain_request.py
+++ b/src/registrar/models/domain_request.py
@@ -496,7 +496,7 @@ class RejectionReasons(models.TextChoices):
choices=OrgChoicesElectionOffice.choices,
null=True,
blank=True,
- help_text="Type of organization - Election office",
+ help_text="\"Election\" appears after the org type if it's an election office.",
)
federally_recognized_tribe = models.BooleanField(
From e1c5375e483ebd153e120f8e666c191155ab0a5d Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 09:00:18 -0600
Subject: [PATCH 19/31] Add margin bottom
---
.../templates/django/admin/includes/domain_fieldset.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/registrar/templates/django/admin/includes/domain_fieldset.html b/src/registrar/templates/django/admin/includes/domain_fieldset.html
index a2c03189a8..5e94642367 100644
--- a/src/registrar/templates/django/admin/includes/domain_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/domain_fieldset.html
@@ -3,7 +3,7 @@
{% block help_text %}
-
+
{% if field.field.name == "state" %}
{{ state_help_message }}
{% else %}
From fc05542da38fd3d03583314972c39e120e833925 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 09:03:27 -0600
Subject: [PATCH 20/31] Update migrations
---
...d_alter_domain_expiration_date_and_more.py | 57 ++++++++++++++++++-
1 file changed, 56 insertions(+), 1 deletion(-)
diff --git a/src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py b/src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py
index c3f6f7bffd..edbadcb4e9 100644
--- a/src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py
+++ b/src/registrar/migrations/0087_alter_domain_deleted_alter_domain_expiration_date_and_more.py
@@ -1,4 +1,4 @@
-# Generated by Django 4.2.10 on 2024-04-22 21:14
+# Generated by Django 4.2.10 on 2024-04-23 15:03
from django.conf import settings
import django.core.validators
@@ -436,6 +436,11 @@ class Migration(migrations.Migration):
name="federally_recognized_tribe",
field=models.BooleanField(null=True),
),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="is_election_board",
+ field=models.BooleanField(blank=True, null=True, verbose_name="election office"),
+ ),
migrations.AlterField(
model_name="domaininformation",
name="no_other_contacts_rationale",
@@ -453,6 +458,31 @@ class Migration(migrations.Migration):
name="organization_name",
field=models.CharField(blank=True, db_index=True, null=True),
),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="organization_type",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("federal", "Federal"),
+ ("interstate", "Interstate"),
+ ("state_or_territory", "State or territory"),
+ ("tribal", "Tribal"),
+ ("county", "County"),
+ ("city", "City"),
+ ("special_district", "Special district"),
+ ("school_district", "School district"),
+ ("state_or_territory_election", "State or territory - Election"),
+ ("tribal_election", "Tribal - Election"),
+ ("county_election", "County - Election"),
+ ("city_election", "City - Election"),
+ ("special_district_election", "Special district - Election"),
+ ],
+ help_text='"Election" appears after the org type if it\'s an election office.',
+ max_length=255,
+ null=True,
+ ),
+ ),
migrations.AlterField(
model_name="domaininformation",
name="state_recognized_tribe",
@@ -978,6 +1008,31 @@ class Migration(migrations.Migration):
name="organization_name",
field=models.CharField(blank=True, db_index=True, null=True),
),
+ migrations.AlterField(
+ model_name="domainrequest",
+ name="organization_type",
+ field=models.CharField(
+ blank=True,
+ choices=[
+ ("federal", "Federal"),
+ ("interstate", "Interstate"),
+ ("state_or_territory", "State or territory"),
+ ("tribal", "Tribal"),
+ ("county", "County"),
+ ("city", "City"),
+ ("special_district", "Special district"),
+ ("school_district", "School district"),
+ ("state_or_territory_election", "State or territory - Election"),
+ ("tribal_election", "Tribal - Election"),
+ ("county_election", "County - Election"),
+ ("city_election", "City - Election"),
+ ("special_district_election", "Special district - Election"),
+ ],
+ help_text='"Election" appears after the org type if it\'s an election office.',
+ max_length=255,
+ null=True,
+ ),
+ ),
migrations.AlterField(
model_name="domainrequest",
name="purpose",
From 0e096d365909a80ce76a707a49b2d58963503c9e Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 09:15:30 -0600
Subject: [PATCH 21/31] Update helper text
---
.../django/admin/includes/detail_table_fieldset.html | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/registrar/templates/django/admin/includes/detail_table_fieldset.html b/src/registrar/templates/django/admin/includes/detail_table_fieldset.html
index 8e8a244271..26baddff75 100644
--- a/src/registrar/templates/django/admin/includes/detail_table_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/detail_table_fieldset.html
@@ -65,6 +65,13 @@
{% endwith %}
{% endblock field_readonly %}
+{% block help_text %}
+
+
{{ field.field.help_text|safe }}
+
+{% endblock help_text %}
+
+
{% block after_help_text %}
{% if field.field.name == "creator" %}
From 7578534f592a42d21b44b41e21a851aead1b5e5b Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 09:29:13 -0600
Subject: [PATCH 22/31] Temp override on unknown state test
---
src/registrar/models/domain.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index 7f53bb2344..448630cc8f 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -1779,7 +1779,8 @@ def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False):
self._update_hosts_and_contacts(cleaned, fetch_hosts, fetch_contacts)
if self.state == self.State.UNKNOWN:
- self._fix_unknown_state(cleaned)
+ # self._fix_unknown_state(cleaned)
+ pass
if fetch_hosts:
self._update_hosts_and_ips_in_db(cleaned)
if fetch_contacts:
From 104f94da0721f2f281134e03620cd1c0c1e3c2df Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 09:38:57 -0600
Subject: [PATCH 23/31] Change context order
---
src/registrar/admin.py | 3 ++-
src/registrar/models/domain.py | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index cee9227707..1c7ff4c87e 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -1750,9 +1750,10 @@ def changeform_view(self, request, object_id=None, form_url="", extra_context=No
if domain is not None and hasattr(domain, "domain_info"):
extra_context["original_object"] = domain.domain_info
+ extra_context["state_help_message"] = Domain.State.get_admin_help_text(domain.state)
+
# Pass in what the an extended expiration date would be for the expiration date modal
extra_context = self._set_expiration_date_context(domain, extra_context)
- extra_context["state_help_message"] = Domain.State.get_admin_help_text(domain.state)
return super().changeform_view(request, object_id, form_url, extra_context)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index 448630cc8f..7f53bb2344 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -1779,8 +1779,7 @@ def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False):
self._update_hosts_and_contacts(cleaned, fetch_hosts, fetch_contacts)
if self.state == self.State.UNKNOWN:
- # self._fix_unknown_state(cleaned)
- pass
+ self._fix_unknown_state(cleaned)
if fetch_hosts:
self._update_hosts_and_ips_in_db(cleaned)
if fetch_contacts:
From cc294c4e7dfb80d61a9f1c94b4ae76a036b7f9f0 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 09:59:54 -0600
Subject: [PATCH 24/31] Linting
---
src/registrar/models/domain_information.py | 2 +-
src/registrar/models/domain_request.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index 31b0ca6070..238b658f8c 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -82,7 +82,7 @@ class DomainInformation(TimeStampedModel):
choices=DomainRequest.OrgChoicesElectionOffice.choices,
null=True,
blank=True,
- help_text="\"Election\" appears after the org type if it's an election office.",
+ help_text='"Election" appears after the org type if it\'s an election office.',
)
federally_recognized_tribe = models.BooleanField(
diff --git a/src/registrar/models/domain_request.py b/src/registrar/models/domain_request.py
index f775e58124..9ed35f489d 100644
--- a/src/registrar/models/domain_request.py
+++ b/src/registrar/models/domain_request.py
@@ -496,7 +496,7 @@ class RejectionReasons(models.TextChoices):
choices=OrgChoicesElectionOffice.choices,
null=True,
blank=True,
- help_text="\"Election\" appears after the org type if it's an election office.",
+ help_text='"Election" appears after the org type if it\'s an election office.',
)
federally_recognized_tribe = models.BooleanField(
From e5b3a6adb4eb2609e2bdcf117d575d0d92360e9c Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 10:41:00 -0600
Subject: [PATCH 25/31] Add loggers
---
src/registrar/admin.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 1c7ff4c87e..7605e0a076 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -1750,10 +1750,12 @@ def changeform_view(self, request, object_id=None, form_url="", extra_context=No
if domain is not None and hasattr(domain, "domain_info"):
extra_context["original_object"] = domain.domain_info
+ logger.info(f"changeform_view() -> state is {domain.state}")
extra_context["state_help_message"] = Domain.State.get_admin_help_text(domain.state)
-
+ logger.info(f"changeform_view() -> state is now {domain.state}")
# Pass in what the an extended expiration date would be for the expiration date modal
- extra_context = self._set_expiration_date_context(domain, extra_context)
+ self._set_expiration_date_context(domain, extra_context)
+ logger.info(f"changeform_view() -> state is now actually {domain.state}")
return super().changeform_view(request, object_id, form_url, extra_context)
@@ -1770,8 +1772,6 @@ def _set_expiration_date_context(self, domain, extra_context):
new_date = curr_exp_date + relativedelta(years=years_to_extend_by)
extra_context["extended_expiration_date"] = new_date
- return extra_context
-
def response_change(self, request, obj):
# Create dictionary of action functions
ACTION_FUNCTIONS = {
From 8d43031d75519f467b3fa4a78f8099cf8b14d42b Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 10:56:30 -0600
Subject: [PATCH 26/31] Hide password
---
src/registrar/admin.py | 3 +--
src/registrar/models/domain.py | 9 +++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 7605e0a076..9891a7317b 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -561,7 +561,7 @@ def overridden_email_field(self, obj):
analyst_fieldsets = (
(
None,
- {"fields": ("password", "status")},
+ {"fields": ("status")},
),
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
(
@@ -587,7 +587,6 @@ def overridden_email_field(self, obj):
# NOT all fields are readonly for admin, otherwise we would have
# set this at the permissions level. The exception is 'status'
analyst_readonly_fields = [
- "password",
"Personal Info",
"first_name",
"last_name",
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index 7f53bb2344..d786fd16a7 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -278,7 +278,7 @@ def registry_expiration_date(self) -> date:
"""Get or set the `ex_date` element from the registry.
Additionally, _get_property updates the expiration date in the registrar"""
try:
- return self._get_property("ex_date")
+ return self._get_property("ex_date", False)
except Exception as e:
# exception raised during the save to registrar
logger.error(f"error updating expiration date in registrar: {e}")
@@ -1770,7 +1770,7 @@ def _add_missing_contacts_if_unknown(self, cleaned):
technical_contact = self.get_default_technical_contact()
technical_contact.save()
- def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False):
+ def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False, fix_unknown=True):
"""Contact registry for info about a domain."""
try:
data_response = self._get_or_create_domain()
@@ -1778,7 +1778,7 @@ def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False):
cleaned = self._clean_cache(cache, data_response)
self._update_hosts_and_contacts(cleaned, fetch_hosts, fetch_contacts)
- if self.state == self.State.UNKNOWN:
+ if self.state == self.State.UNKNOWN and fix_unknown:
self._fix_unknown_state(cleaned)
if fetch_hosts:
self._update_hosts_and_ips_in_db(cleaned)
@@ -2008,12 +2008,13 @@ def _invalidate_cache(self):
"""Remove cache data when updates are made."""
self._cache = {}
- def _get_property(self, property):
+ def _get_property(self, property, fix_unknown=True):
"""Get some piece of info about a domain."""
if property not in self._cache:
self._fetch_cache(
fetch_hosts=(property == "hosts"),
fetch_contacts=(property == "contacts"),
+ fix_unknown=fix_unknown,
)
if property in self._cache:
From 9583dbca948a54cf372ffd53c0de1d3a5ef0040d Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 11:19:30 -0600
Subject: [PATCH 27/31] Test
---
src/registrar/admin.py | 5 ++---
src/registrar/models/domain.py | 9 ++++-----
.../templates/django/admin/includes/domain_fieldset.html | 6 ++++++
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 9891a7317b..acfbd77f7a 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -1749,12 +1749,11 @@ def changeform_view(self, request, object_id=None, form_url="", extra_context=No
if domain is not None and hasattr(domain, "domain_info"):
extra_context["original_object"] = domain.domain_info
- logger.info(f"changeform_view() -> state is {domain.state}")
extra_context["state_help_message"] = Domain.State.get_admin_help_text(domain.state)
- logger.info(f"changeform_view() -> state is now {domain.state}")
+ extra_context["domain_state"] = domain.state
+
# Pass in what the an extended expiration date would be for the expiration date modal
self._set_expiration_date_context(domain, extra_context)
- logger.info(f"changeform_view() -> state is now actually {domain.state}")
return super().changeform_view(request, object_id, form_url, extra_context)
diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py
index d786fd16a7..7f53bb2344 100644
--- a/src/registrar/models/domain.py
+++ b/src/registrar/models/domain.py
@@ -278,7 +278,7 @@ def registry_expiration_date(self) -> date:
"""Get or set the `ex_date` element from the registry.
Additionally, _get_property updates the expiration date in the registrar"""
try:
- return self._get_property("ex_date", False)
+ return self._get_property("ex_date")
except Exception as e:
# exception raised during the save to registrar
logger.error(f"error updating expiration date in registrar: {e}")
@@ -1770,7 +1770,7 @@ def _add_missing_contacts_if_unknown(self, cleaned):
technical_contact = self.get_default_technical_contact()
technical_contact.save()
- def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False, fix_unknown=True):
+ def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False):
"""Contact registry for info about a domain."""
try:
data_response = self._get_or_create_domain()
@@ -1778,7 +1778,7 @@ def _fetch_cache(self, fetch_hosts=False, fetch_contacts=False, fix_unknown=True
cleaned = self._clean_cache(cache, data_response)
self._update_hosts_and_contacts(cleaned, fetch_hosts, fetch_contacts)
- if self.state == self.State.UNKNOWN and fix_unknown:
+ if self.state == self.State.UNKNOWN:
self._fix_unknown_state(cleaned)
if fetch_hosts:
self._update_hosts_and_ips_in_db(cleaned)
@@ -2008,13 +2008,12 @@ def _invalidate_cache(self):
"""Remove cache data when updates are made."""
self._cache = {}
- def _get_property(self, property, fix_unknown=True):
+ def _get_property(self, property):
"""Get some piece of info about a domain."""
if property not in self._cache:
self._fetch_cache(
fetch_hosts=(property == "hosts"),
fetch_contacts=(property == "contacts"),
- fix_unknown=fix_unknown,
)
if property in self._cache:
diff --git a/src/registrar/templates/django/admin/includes/domain_fieldset.html b/src/registrar/templates/django/admin/includes/domain_fieldset.html
index 5e94642367..b191e17e74 100644
--- a/src/registrar/templates/django/admin/includes/domain_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/domain_fieldset.html
@@ -2,6 +2,12 @@
{% load static url_helpers %}
+{% block field_readonly %}
+ {% if field.field.name == "state" %}
+
{{ domain_state }}
+ {% endif %}
+{% endblock %}
+
{% block help_text %}
{% if field.field.name == "state" %}
From e181d6838ea32918c2f0c8b0789e8b2a0c8ce0f0 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 11:34:42 -0600
Subject: [PATCH 28/31] add state display
---
src/registrar/admin.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index acfbd77f7a..ef65b37b1b 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -1750,7 +1750,7 @@ def changeform_view(self, request, object_id=None, form_url="", extra_context=No
extra_context["original_object"] = domain.domain_info
extra_context["state_help_message"] = Domain.State.get_admin_help_text(domain.state)
- extra_context["domain_state"] = domain.state
+ extra_context["domain_state"] = domain.get_state_display()
# Pass in what the an extended expiration date would be for the expiration date modal
self._set_expiration_date_context(domain, extra_context)
From 5a18f8c1f2b9d0dfb3d6a5dd18786b3e538a1a68 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 11:54:16 -0600
Subject: [PATCH 29/31] Bug fix
---
.../templates/django/admin/includes/domain_fieldset.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/registrar/templates/django/admin/includes/domain_fieldset.html b/src/registrar/templates/django/admin/includes/domain_fieldset.html
index b191e17e74..d5f5bc1aff 100644
--- a/src/registrar/templates/django/admin/includes/domain_fieldset.html
+++ b/src/registrar/templates/django/admin/includes/domain_fieldset.html
@@ -5,6 +5,8 @@
{% block field_readonly %}
{% if field.field.name == "state" %}
{{ domain_state }}
+ {% else %}
+
{{ field.contents }}
{% endif %}
{% endblock %}
From d4ebab0f8f65cc334438aa4e3a988753061f5fde Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 12:18:49 -0600
Subject: [PATCH 30/31] Fix unit test
---
src/registrar/tests/test_admin.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index 19783b3f24..f2fdd2f1cf 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -3039,7 +3039,7 @@ def test_get_fieldsets_cisa_analyst(self):
request.user = create_user()
fieldsets = self.admin.get_fieldsets(request)
expected_fieldsets = (
- (None, {"fields": ("password", "status")}),
+ (None, {"fields": ("status")}),
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
("Permissions", {"fields": ("is_active", "groups")}),
("Important dates", {"fields": ("last_login", "date_joined")}),
From fe75724073cce60d589f8916cc5fe98ab234b327 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Tue, 23 Apr 2024 12:30:21 -0600
Subject: [PATCH 31/31] Add comma
---
src/registrar/admin.py | 2 +-
src/registrar/tests/test_admin.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index ef65b37b1b..42d73f10d2 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -561,7 +561,7 @@ def overridden_email_field(self, obj):
analyst_fieldsets = (
(
None,
- {"fields": ("status")},
+ {"fields": ("status",)},
),
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
(
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index f2fdd2f1cf..42baae6ef3 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -3039,7 +3039,7 @@ def test_get_fieldsets_cisa_analyst(self):
request.user = create_user()
fieldsets = self.admin.get_fieldsets(request)
expected_fieldsets = (
- (None, {"fields": ("status")}),
+ (None, {"fields": ("status",)}),
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
("Permissions", {"fields": ("is_active", "groups")}),
("Important dates", {"fields": ("last_login", "date_joined")}),