{% with heading_level='h3' %}
- {% with org_type=domainapplication.get_organization_type_display %}
+ {% with org_type=DomainRequest.get_organization_type_display %}
{% include "includes/summary_item.html" with title='Type of organization' value=org_type heading_level=heading_level %}
{% endwith %}
- {% if domainapplication.tribe_name %}
- {% include "includes/summary_item.html" with title='Tribal government' value=domainapplication.tribe_name heading_level=heading_level %}
+ {% if DomainRequest.tribe_name %}
+ {% include "includes/summary_item.html" with title='Tribal government' value=DomainRequest.tribe_name heading_level=heading_level %}
- {% if domainapplication.federally_recognized_tribe %}
+ {% if DomainRequest.federally_recognized_tribe %}
Federally-recognized tribe
{% endif %}
- {% if domainapplication.state_recognized_tribe %}
+ {% if DomainRequest.state_recognized_tribe %}
State-recognized tribe
{% endif %}
{% endif %}
- {% if domainapplication.get_federal_type_display %}
- {% include "includes/summary_item.html" with title='Federal government branch' value=domainapplication.get_federal_type_display heading_level=heading_level %}
+ {% if DomainRequest.get_federal_type_display %}
+ {% include "includes/summary_item.html" with title='Federal government branch' value=DomainRequest.get_federal_type_display heading_level=heading_level %}
{% endif %}
- {% if domainapplication.is_election_board %}
- {% with value=domainapplication.is_election_board|yesno:"Yes,No,Incomplete" %}
+ {% if DomainRequest.is_election_board %}
+ {% with value=DomainRequest.is_election_board|yesno:"Yes,No,Incomplete" %}
{% include "includes/summary_item.html" with title='Election office' value=value heading_level=heading_level %}
{% endwith %}
{% endif %}
- {% if domainapplication.organization_name %}
- {% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' heading_level=heading_level %}
+ {% if DomainRequest.organization_name %}
+ {% include "includes/summary_item.html" with title='Organization name and mailing address' value=DomainRequest address='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.about_your_organization %}
- {% include "includes/summary_item.html" with title='About your organization' value=domainapplication.about_your_organization heading_level=heading_level %}
+ {% if DomainRequest.about_your_organization %}
+ {% include "includes/summary_item.html" with title='About your organization' value=DomainRequest.about_your_organization heading_level=heading_level %}
{% endif %}
- {% if domainapplication.authorizing_official %}
- {% include "includes/summary_item.html" with title='Authorizing official' value=domainapplication.authorizing_official contact='true' heading_level=heading_level %}
+ {% if DomainRequest.authorizing_official %}
+ {% include "includes/summary_item.html" with title='Authorizing official' value=DomainRequest.authorizing_official contact='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.current_websites.all %}
- {% include "includes/summary_item.html" with title='Current websites' value=domainapplication.current_websites.all list='true' heading_level=heading_level %}
+ {% if DomainRequest.current_websites.all %}
+ {% include "includes/summary_item.html" with title='Current websites' value=DomainRequest.current_websites.all list='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.requested_domain %}
- {% include "includes/summary_item.html" with title='.gov domain' value=domainapplication.requested_domain heading_level=heading_level %}
+ {% if DomainRequest.requested_domain %}
+ {% include "includes/summary_item.html" with title='.gov domain' value=DomainRequest.requested_domain heading_level=heading_level %}
{% endif %}
- {% if domainapplication.alternative_domains.all %}
- {% include "includes/summary_item.html" with title='Alternative domains' value=domainapplication.alternative_domains.all list='true' heading_level=heading_level %}
+ {% if DomainRequest.alternative_domains.all %}
+ {% include "includes/summary_item.html" with title='Alternative domains' value=DomainRequest.alternative_domains.all list='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.purpose %}
- {% include "includes/summary_item.html" with title='Purpose of your domain' value=domainapplication.purpose heading_level=heading_level %}
+ {% if DomainRequest.purpose %}
+ {% include "includes/summary_item.html" with title='Purpose of your domain' value=DomainRequest.purpose heading_level=heading_level %}
{% endif %}
- {% if domainapplication.submitter %}
- {% include "includes/summary_item.html" with title='Your contact information' value=domainapplication.submitter contact='true' heading_level=heading_level %}
+ {% if DomainRequest.submitter %}
+ {% include "includes/summary_item.html" with title='Your contact information' value=DomainRequest.submitter contact='true' heading_level=heading_level %}
{% endif %}
- {% if domainapplication.other_contacts.all %}
- {% include "includes/summary_item.html" with title='Other employees from your organization' value=domainapplication.other_contacts.all contact='true' list='true' heading_level=heading_level %}
+ {% if DomainRequest.other_contacts.all %}
+ {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.other_contacts.all contact='true' list='true' heading_level=heading_level %}
{% else %}
- {% include "includes/summary_item.html" with title='Other employees from your organization' value=domainapplication.no_other_contacts_rationale heading_level=heading_level %}
+ {% include "includes/summary_item.html" with title='Other employees from your organization' value=DomainRequest.no_other_contacts_rationale heading_level=heading_level %}
{% endif %}
- {% include "includes/summary_item.html" with title='Anything else?' value=domainapplication.anything_else|default:"No" heading_level=heading_level %}
+ {% include "includes/summary_item.html" with title='Anything else?' value=DomainRequest.anything_else|default:"No" heading_level=heading_level %}
{% endwith %}
- {% if domain_applications %}
+ {% if domain_requests %}
Your domain requests
@@ -118,7 +118,7 @@
- {% for application in domain_applications %}
+ {% for application in domain_requests %}
{% if application.requested_domain is None %}
diff --git a/src/registrar/templatetags/custom_filters.py b/src/registrar/templatetags/custom_filters.py
index de2051989..ff7a6258c 100644
--- a/src/registrar/templatetags/custom_filters.py
+++ b/src/registrar/templatetags/custom_filters.py
@@ -1,7 +1,7 @@
import logging
from django import template
import re
-from registrar.models.domain_application import DomainApplication
+from registrar.models.domain_request import DomainRequest
register = template.Library()
logger = logging.getLogger(__name__)
@@ -55,7 +55,7 @@ def contains_checkbox(html_list):
@register.filter
def get_organization_long_name(organization_type):
- organization_choices_dict = dict(DomainApplication.OrganizationChoicesVerbose.choices)
+ organization_choices_dict = dict(DomainRequest.OrganizationChoicesVerbose.choices)
long_form_type = organization_choices_dict[organization_type]
if long_form_type is None:
logger.error("Organization type error, triggered by a template's custom filter")
diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py
index ee1ab8b68..184ed9132 100644
--- a/src/registrar/tests/common.py
+++ b/src/registrar/tests/common.py
@@ -18,7 +18,7 @@ from registrar.models import (
Contact,
DraftDomain,
Website,
- DomainApplication,
+ DomainRequest,
DomainInvitation,
User,
UserGroup,
@@ -365,13 +365,13 @@ class AuditedAdminMockData:
self,
domain_type,
item_name,
- status=DomainApplication.ApplicationStatus.STARTED,
+ status=DomainRequest.ApplicationStatus.STARTED,
org_type="federal",
federal_type="executive",
purpose="Purpose of the site",
):
"""
- Returns a prebuilt kwarg dictionary for DomainApplication,
+ Returns a prebuilt kwarg dictionary for DomainRequest,
DomainInformation, or DomainInvitation.
Args:
domain_type (str): is either 'application', 'information',
@@ -381,8 +381,8 @@ class AuditedAdminMockData:
organization_name, address_line1, address_line2,
title, email, and username.
- status (str - optional): Defines the status for DomainApplication,
- e.g. DomainApplication.ApplicationStatus.STARTED
+ status (str - optional): Defines the status for DomainRequest,
+ e.g. DomainRequest.ApplicationStatus.STARTED
org_type (str - optional): Sets a domains org_type
@@ -391,7 +391,7 @@ class AuditedAdminMockData:
purpose (str - optional): Sets a domains purpose
Returns:
dict: Returns a dictionary structurally consistent with the expected input
- of either DomainApplication, DomainInvitation, or DomainInformation
+ of either DomainRequest, DomainInvitation, or DomainInformation
based on the 'domain_type' field.
""" # noqa
common_args = self.get_common_domain_arg_dictionary(item_name, org_type, federal_type, purpose)
@@ -405,11 +405,11 @@ class AuditedAdminMockData:
status=status,
)
case self.INFORMATION:
- domain_app = self.create_full_dummy_domain_application(item_name)
+ domain_app = self.create_full_dummy_domain_request(item_name)
full_arg_dict = dict(
**common_args,
domain=self.dummy_domain(item_name, True),
- domain_application=domain_app,
+ domain_request=domain_app,
)
case self.INVITATION:
full_arg_dict = dict(
@@ -419,22 +419,22 @@ class AuditedAdminMockData:
)
return full_arg_dict
- def create_full_dummy_domain_application(self, item_name, status=DomainApplication.ApplicationStatus.STARTED):
- """Creates a dummy domain application object"""
- domain_application_kwargs = self.dummy_kwarg_boilerplate(self.APPLICATION, item_name, status)
- application = DomainApplication.objects.get_or_create(**domain_application_kwargs)[0]
+ def create_full_dummy_domain_request(self, item_name, status=DomainRequest.ApplicationStatus.STARTED):
+ """Creates a dummy domain request object"""
+ domain_request_kwargs = self.dummy_kwarg_boilerplate(self.APPLICATION, item_name, status)
+ application = DomainRequest.objects.get_or_create(**domain_request_kwargs)[0]
return application
- def create_full_dummy_domain_information(self, item_name, status=DomainApplication.ApplicationStatus.STARTED):
+ def create_full_dummy_domain_information(self, item_name, status=DomainRequest.ApplicationStatus.STARTED):
"""Creates a dummy domain information object"""
- domain_application_kwargs = self.dummy_kwarg_boilerplate(self.INFORMATION, item_name, status)
- application = DomainInformation.objects.get_or_create(**domain_application_kwargs)[0]
+ domain_request_kwargs = self.dummy_kwarg_boilerplate(self.INFORMATION, item_name, status)
+ application = DomainInformation.objects.get_or_create(**domain_request_kwargs)[0]
return application
- def create_full_dummy_domain_invitation(self, item_name, status=DomainApplication.ApplicationStatus.STARTED):
+ def create_full_dummy_domain_invitation(self, item_name, status=DomainRequest.ApplicationStatus.STARTED):
"""Creates a dummy domain invitation object"""
- domain_application_kwargs = self.dummy_kwarg_boilerplate(self.INVITATION, item_name, status)
- application = DomainInvitation.objects.get_or_create(**domain_application_kwargs)[0]
+ domain_request_kwargs = self.dummy_kwarg_boilerplate(self.INVITATION, item_name, status)
+ application = DomainInvitation.objects.get_or_create(**domain_request_kwargs)[0]
return application
@@ -445,13 +445,13 @@ class AuditedAdminMockData:
has_other_contacts=True,
has_current_website=True,
has_alternative_gov_domain=True,
- status=DomainApplication.ApplicationStatus.STARTED,
+ status=DomainRequest.ApplicationStatus.STARTED,
):
- """A helper to create a dummy domain application object"""
+ """A helper to create a dummy domain request object"""
application = None
match domain_type:
case self.APPLICATION:
- application = self.create_full_dummy_domain_application(item_name, status)
+ application = self.create_full_dummy_domain_request(item_name, status)
case self.INVITATION:
application = self.create_full_dummy_domain_invitation(item_name, status)
case self.INFORMATION:
@@ -526,12 +526,12 @@ def completed_application(
has_alternative_gov_domain=True,
has_about_your_organization=True,
has_anything_else=True,
- status=DomainApplication.ApplicationStatus.STARTED,
+ status=DomainRequest.ApplicationStatus.STARTED,
user=False,
submitter=False,
name="city.gov",
):
- """A completed domain application."""
+ """A completed domain request."""
if not user:
user = get_user_model().objects.create(username="username" + str(uuid.uuid4())[:8])
ao, _ = Contact.objects.get_or_create(
@@ -559,7 +559,7 @@ def completed_application(
email="testy2@town.com",
phone="(555) 555 5557",
)
- domain_application_kwargs = dict(
+ domain_request_kwargs = dict(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -576,11 +576,11 @@ def completed_application(
status=status,
)
if has_about_your_organization:
- domain_application_kwargs["about_your_organization"] = "e-Government"
+ domain_request_kwargs["about_your_organization"] = "e-Government"
if has_anything_else:
- domain_application_kwargs["anything_else"] = "There is more"
+ domain_request_kwargs["anything_else"] = "There is more"
- application, _ = DomainApplication.objects.get_or_create(**domain_application_kwargs)
+ application, _ = DomainRequest.objects.get_or_create(**domain_request_kwargs)
if has_other_contacts:
application.other_contacts.add(other)
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index d76f12f35..d9eef5cd2 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -7,8 +7,8 @@ from django.contrib import messages
from django.urls import reverse
from registrar.admin import (
DomainAdmin,
- DomainApplicationAdmin,
- DomainApplicationAdminForm,
+ DomainRequestAdmin,
+ DomainRequestAdminForm,
DomainInvitationAdmin,
ListHeaderAdmin,
MyUserAdmin,
@@ -18,7 +18,7 @@ from registrar.admin import (
UserDomainRoleAdmin,
VerifiedByStaffAdmin,
)
-from registrar.models import Domain, DomainApplication, DomainInformation, User, DomainInvitation, Contact, Website
+from registrar.models import Domain, DomainRequest, DomainInformation, User, DomainInvitation, Contact, Website
from registrar.models.user_domain_role import UserDomainRole
from registrar.models.verified_by_staff import VerifiedByStaff
from .common import (
@@ -236,7 +236,7 @@ class TestDomainAdmin(MockEppLib, WebTest):
"""
with less_console_noise():
self.client.force_login(self.superuser)
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
mock_client = MockSESClient()
with boto3_mocking.clients.handler_for("sesv2", mock_client):
application.approve()
@@ -435,11 +435,11 @@ class TestDomainAdmin(MockEppLib, WebTest):
super().tearDown()
Domain.objects.all().delete()
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
User.objects.all().delete()
-class TestDomainApplicationAdminForm(TestCase):
+class TestDomainRequestAdminForm(TestCase):
def setUp(self):
# Create a test application with an initial state of started
self.application = completed_application()
@@ -447,7 +447,7 @@ class TestDomainApplicationAdminForm(TestCase):
def test_form_choices(self):
with less_console_noise():
# Create a form instance with the test application
- form = DomainApplicationAdminForm(instance=self.application)
+ form = DomainRequestAdminForm(instance=self.application)
# Verify that the form choices match the available transitions for started
expected_choices = [("started", "Started"), ("submitted", "Submitted")]
@@ -456,41 +456,41 @@ class TestDomainApplicationAdminForm(TestCase):
def test_form_choices_when_no_instance(self):
with less_console_noise():
# Create a form instance without an instance
- form = DomainApplicationAdminForm()
+ form = DomainRequestAdminForm()
# Verify that the form choices show all choices when no instance is provided;
# this is necessary to show all choices when creating a new domain
# application in django admin;
- # note that FSM ensures that no domain application exists with invalid status,
+ # note that FSM ensures that no domain request exists with invalid status,
# so don't need to test for invalid status
self.assertEqual(
form.fields["status"].widget.choices,
- DomainApplication._meta.get_field("status").choices,
+ DomainRequest._meta.get_field("status").choices,
)
def test_form_choices_when_ineligible(self):
with less_console_noise():
- # Create a form instance with a domain application with ineligible status
- ineligible_application = DomainApplication(status="ineligible")
+ # Create a form instance with a domain request with ineligible status
+ ineligible_application = DomainRequest(status="ineligible")
# Attempt to create a form with the ineligible application
# The form should not raise an error, but choices should be the
# full list of possible choices
- form = DomainApplicationAdminForm(instance=ineligible_application)
+ form = DomainRequestAdminForm(instance=ineligible_application)
self.assertEqual(
form.fields["status"].widget.choices,
- DomainApplication._meta.get_field("status").choices,
+ DomainRequest._meta.get_field("status").choices,
)
@boto3_mocking.patching
-class TestDomainApplicationAdmin(MockEppLib):
+class TestDomainRequestAdmin(MockEppLib):
def setUp(self):
super().setUp()
self.site = AdminSite()
self.factory = RequestFactory()
- self.admin = DomainApplicationAdmin(model=DomainApplication, admin_site=self.site)
+ self.admin = DomainRequestAdmin(model=DomainRequest, admin_site=self.site)
self.superuser = create_superuser()
self.staffuser = create_user()
self.client = Client(HTTP_HOST="localhost:8080")
@@ -498,13 +498,13 @@ class TestDomainApplicationAdmin(MockEppLib):
factory=self.factory,
user=self.superuser,
admin=self.admin,
- url="/admin/registrar/DomainApplication/",
- model=DomainApplication,
+ url="/admin/registrar/DomainRequest/",
+ model=DomainRequest,
)
self.mock_client = MockSESClient()
def test_domain_sortable(self):
- """Tests if the DomainApplication sorts by domain correctly"""
+ """Tests if the DomainRequest sorts by domain correctly"""
with less_console_noise():
p = "adminpass"
self.client.login(username="superuser", password=p)
@@ -518,7 +518,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.test_helper.assert_table_sorted("-1", ("-requested_domain__name",))
def test_submitter_sortable(self):
- """Tests if the DomainApplication sorts by domain correctly"""
+ """Tests if the DomainRequest sorts by domain correctly"""
with less_console_noise():
p = "adminpass"
self.client.login(username="superuser", password=p)
@@ -549,7 +549,7 @@ class TestDomainApplicationAdmin(MockEppLib):
)
def test_investigator_sortable(self):
- """Tests if the DomainApplication sorts by domain correctly"""
+ """Tests if the DomainRequest sorts by domain correctly"""
with less_console_noise():
p = "adminpass"
self.client.login(username="superuser", password=p)
@@ -585,7 +585,7 @@ class TestDomainApplicationAdmin(MockEppLib):
with less_console_noise():
self.client.force_login(self.superuser)
completed_application()
- response = self.client.get("/admin/registrar/domainapplication/")
+ response = self.client.get("/admin/registrar/DomainRequest/")
# There are 4 template references to Federal (4) plus two references in the table
# for our actual application
self.assertContains(response, "Federal", count=6)
@@ -600,7 +600,7 @@ class TestDomainApplicationAdmin(MockEppLib):
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
with less_console_noise():
# Create a mock request
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
# Modify the application's properties
application.status = status
@@ -661,39 +661,39 @@ class TestDomainApplicationAdmin(MockEppLib):
application = completed_application()
# Test Submitted Status from started
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assert_email_is_accurate("We received your .gov domain request.", 0, EMAIL, True)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Test Withdrawn Status
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.WITHDRAWN)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.WITHDRAWN)
self.assert_email_is_accurate(
"Your .gov domain request has been withdrawn and will not be reviewed by our team.", 1, EMAIL, True
)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
# Test Submitted Status Again (from withdrawn)
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Move it to IN_REVIEW
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.IN_REVIEW)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Test Submitted Status Again from in IN_REVIEW, no new email should be sent
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Move it to IN_REVIEW
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.IN_REVIEW)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Move it to ACTION_NEEDED
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.ACTION_NEEDED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.ACTION_NEEDED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Test Submitted Status Again from in ACTION_NEEDED, no new email should be sent
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
@override_settings(IS_PRODUCTION=True)
@@ -718,40 +718,40 @@ class TestDomainApplicationAdmin(MockEppLib):
application = completed_application()
# Test Submitted Status from started
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assert_email_is_accurate("We received your .gov domain request.", 0, EMAIL, False, BCC_EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Test Withdrawn Status
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.WITHDRAWN)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.WITHDRAWN)
self.assert_email_is_accurate(
"Your .gov domain request has been withdrawn and will not be reviewed by our team.", 1, EMAIL
)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
# Test Submitted Status Again (from withdrawn)
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assert_email_is_accurate("We received your .gov domain request.", 0, EMAIL, False, BCC_EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Move it to IN_REVIEW
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.IN_REVIEW)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Test Submitted Status Again from in IN_REVIEW, no new email should be sent
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Move it to IN_REVIEW
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.IN_REVIEW)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Move it to ACTION_NEEDED
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.ACTION_NEEDED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.ACTION_NEEDED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
# Test Submitted Status Again from in ACTION_NEEDED, no new email should be sent
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
def test_save_model_sends_approved_email(self):
@@ -764,24 +764,24 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Test Submitted Status
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 0, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Test Withdrawn Status
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.DOMAIN_PURPOSE,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.DOMAIN_PURPOSE,
)
self.assert_email_is_accurate("Your .gov domain request has been rejected.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
# Test Submitted Status Again (No new email should be sent)
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
def test_save_model_sends_rejected_email_purpose_not_met(self):
@@ -794,13 +794,13 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason DOMAIN_PURPOSE and test email
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.DOMAIN_PURPOSE,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.DOMAIN_PURPOSE,
)
self.assert_email_is_accurate(
"Your domain request was rejected because the purpose you provided did not meet our \nrequirements.",
@@ -810,7 +810,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -824,11 +824,11 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason REQUESTOR and test email including dynamic organization name
self.transition_state_and_send_email(
- application, DomainApplication.ApplicationStatus.REJECTED, DomainApplication.RejectionReasons.REQUESTOR
+ application, DomainRequest.ApplicationStatus.REJECTED, DomainRequest.RejectionReasons.REQUESTOR
)
self.assert_email_is_accurate(
"Your domain request was rejected because we don’t believe you’re eligible to request a \n.gov "
@@ -839,7 +839,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -853,13 +853,13 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason SECOND_DOMAIN_REASONING and test email including dynamic organization name
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.SECOND_DOMAIN_REASONING,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.SECOND_DOMAIN_REASONING,
)
self.assert_email_is_accurate(
"Your domain request was rejected because Testorg has a .gov domain.", 0, EMAIL
@@ -867,7 +867,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -881,13 +881,13 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason CONTACTS_OR_ORGANIZATION_LEGITIMACY and test email including dynamic organization name
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.CONTACTS_OR_ORGANIZATION_LEGITIMACY,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.CONTACTS_OR_ORGANIZATION_LEGITIMACY,
)
self.assert_email_is_accurate(
"Your domain request was rejected because we could not verify the organizational \n"
@@ -898,7 +898,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -912,13 +912,13 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason ORGANIZATION_ELIGIBILITY and test email including dynamic organization name
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.ORGANIZATION_ELIGIBILITY,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.ORGANIZATION_ELIGIBILITY,
)
self.assert_email_is_accurate(
"Your domain request was rejected because we determined that Testorg is not \neligible for "
@@ -929,7 +929,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -943,13 +943,13 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason NAMING_REQUIREMENTS and test email including dynamic organization name
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.NAMING_REQUIREMENTS,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.NAMING_REQUIREMENTS,
)
self.assert_email_is_accurate(
"Your domain request was rejected because it does not meet our naming requirements.", 0, EMAIL
@@ -957,7 +957,7 @@ class TestDomainApplicationAdmin(MockEppLib):
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -971,19 +971,19 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Reject for reason NAMING_REQUIREMENTS and test email including dynamic organization name
self.transition_state_and_send_email(
application,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.OTHER,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.OTHER,
)
self.assert_email_is_accurate("Choosing a .gov domain name", 0, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Approve
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.APPROVED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.APPROVED)
self.assert_email_is_accurate("Congratulations! Your .gov domain request has been approved.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
@@ -995,15 +995,15 @@ class TestDomainApplicationAdmin(MockEppLib):
"""
with less_console_noise():
- application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.APPROVED)
# Create a request object with a superuser
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
request.user = self.superuser
with ExitStack() as stack:
stack.enter_context(patch.object(messages, "error"))
- application.status = DomainApplication.ApplicationStatus.REJECTED
+ application.status = DomainRequest.ApplicationStatus.REJECTED
self.admin.save_model(request, application, None, True)
@@ -1013,7 +1013,7 @@ class TestDomainApplicationAdmin(MockEppLib):
)
application.refresh_from_db()
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.APPROVED)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.APPROVED)
def test_transition_to_rejected_with_rejection_reason_does_not_trigger_error(self):
"""
@@ -1023,23 +1023,23 @@ class TestDomainApplicationAdmin(MockEppLib):
"""
with less_console_noise():
- application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.APPROVED)
# Create a request object with a superuser
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
request.user = self.superuser
with ExitStack() as stack:
stack.enter_context(patch.object(messages, "error"))
- application.status = DomainApplication.ApplicationStatus.REJECTED
- application.rejection_reason = DomainApplication.RejectionReasons.CONTACTS_OR_ORGANIZATION_LEGITIMACY
+ application.status = DomainRequest.ApplicationStatus.REJECTED
+ application.rejection_reason = DomainRequest.RejectionReasons.CONTACTS_OR_ORGANIZATION_LEGITIMACY
self.admin.save_model(request, application, None, True)
messages.error.assert_not_called()
application.refresh_from_db()
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.REJECTED)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.REJECTED)
def test_save_model_sends_withdrawn_email(self):
"""When transitioning to withdrawn on a domain request,
@@ -1051,22 +1051,22 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Test Submitted Status
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.WITHDRAWN)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.WITHDRAWN)
self.assert_email_is_accurate(
"Your .gov domain request has been withdrawn and will not be reviewed by our team.", 0, EMAIL
)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 1)
# Test Withdrawn Status
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.SUBMITTED)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.SUBMITTED)
self.assert_email_is_accurate("We received your .gov domain request.", 1, EMAIL)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 2)
# Test Submitted Status Again (No new email should be sent)
- self.transition_state_and_send_email(application, DomainApplication.ApplicationStatus.WITHDRAWN)
+ self.transition_state_and_send_email(application, DomainRequest.ApplicationStatus.WITHDRAWN)
self.assertEqual(len(self.mock_client.EMAILS_SENT), 3)
def test_save_model_sets_approved_domain(self):
@@ -1076,14 +1076,14 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Create a mock request
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
# Modify the application's property
- application.status = DomainApplication.ApplicationStatus.APPROVED
+ application.status = DomainRequest.ApplicationStatus.APPROVED
# Use the model admin's save_model method
self.admin.save_model(request, application, form=None, change=True)
@@ -1098,14 +1098,14 @@ class TestDomainApplicationAdmin(MockEppLib):
User.objects.filter(email=EMAIL).delete()
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
# Create a mock request
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
# Modify the application's property
- application.status = DomainApplication.ApplicationStatus.INELIGIBLE
+ application.status = DomainRequest.ApplicationStatus.INELIGIBLE
# Use the model admin's save_model method
self.admin.save_model(request, application, form=None, change=True)
@@ -1115,7 +1115,7 @@ class TestDomainApplicationAdmin(MockEppLib):
def test_readonly_when_restricted_creator(self):
with less_console_noise():
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
application.creator.status = User.RESTRICTED
application.creator.save()
@@ -1201,7 +1201,7 @@ class TestDomainApplicationAdmin(MockEppLib):
def test_saving_when_restricted_creator(self):
with less_console_noise():
# Create an instance of the model
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
application.creator.status = User.RESTRICTED
application.creator.save()
@@ -1221,19 +1221,19 @@ class TestDomainApplicationAdmin(MockEppLib):
)
# Assert that the status has not changed
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.IN_REVIEW)
def test_change_view_with_restricted_creator(self):
with less_console_noise():
# Create an instance of the model
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
application.creator.status = User.RESTRICTED
application.creator.save()
with patch("django.contrib.messages.warning") as mock_warning:
# Create a request object with a superuser
- request = self.factory.get("/admin/your_app/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.get("/admin/your_app/DomainRequest/{}/change/".format(application.pk))
request.user = self.superuser
self.admin.display_restricted_warning(request, application)
@@ -1253,14 +1253,14 @@ class TestDomainApplicationAdmin(MockEppLib):
with less_console_noise():
# Create an instance of the model
- application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.APPROVED)
domain = Domain.objects.create(name=application.requested_domain.name)
domain_information = DomainInformation.objects.create(creator=self.superuser, domain=domain)
application.approved_domain = domain
application.save()
# Create a request object with a superuser
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
request.user = self.superuser
# Define a custom implementation for is_active
@@ -1299,38 +1299,38 @@ class TestDomainApplicationAdmin(MockEppLib):
domain_information.refresh_from_db()
def test_error_when_saving_approved_to_in_review_and_domain_is_active(self):
- self.trigger_saving_approved_to_another_state(True, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.trigger_saving_approved_to_another_state(True, DomainRequest.ApplicationStatus.IN_REVIEW)
def test_error_when_saving_approved_to_action_needed_and_domain_is_active(self):
- self.trigger_saving_approved_to_another_state(True, DomainApplication.ApplicationStatus.ACTION_NEEDED)
+ self.trigger_saving_approved_to_another_state(True, DomainRequest.ApplicationStatus.ACTION_NEEDED)
def test_error_when_saving_approved_to_rejected_and_domain_is_active(self):
- self.trigger_saving_approved_to_another_state(True, DomainApplication.ApplicationStatus.REJECTED)
+ self.trigger_saving_approved_to_another_state(True, DomainRequest.ApplicationStatus.REJECTED)
def test_error_when_saving_approved_to_ineligible_and_domain_is_active(self):
- self.trigger_saving_approved_to_another_state(True, DomainApplication.ApplicationStatus.INELIGIBLE)
+ self.trigger_saving_approved_to_another_state(True, DomainRequest.ApplicationStatus.INELIGIBLE)
def test_side_effects_when_saving_approved_to_in_review(self):
- self.trigger_saving_approved_to_another_state(False, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.trigger_saving_approved_to_another_state(False, DomainRequest.ApplicationStatus.IN_REVIEW)
def test_side_effects_when_saving_approved_to_action_needed(self):
- self.trigger_saving_approved_to_another_state(False, DomainApplication.ApplicationStatus.ACTION_NEEDED)
+ self.trigger_saving_approved_to_another_state(False, DomainRequest.ApplicationStatus.ACTION_NEEDED)
def test_side_effects_when_saving_approved_to_rejected(self):
self.trigger_saving_approved_to_another_state(
False,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.RejectionReasons.CONTACTS_OR_ORGANIZATION_LEGITIMACY,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.RejectionReasons.CONTACTS_OR_ORGANIZATION_LEGITIMACY,
)
def test_side_effects_when_saving_approved_to_ineligible(self):
- self.trigger_saving_approved_to_another_state(False, DomainApplication.ApplicationStatus.INELIGIBLE)
+ self.trigger_saving_approved_to_another_state(False, DomainRequest.ApplicationStatus.INELIGIBLE)
def test_has_correct_filters(self):
"""
- This test verifies that DomainApplicationAdmin has the correct filters set up.
+ This test verifies that DomainRequestAdmin has the correct filters set up.
- It retrieves the current list of filters from DomainApplicationAdmin
+ It retrieves the current list of filters from DomainRequestAdmin
and checks that it matches the expected list of filters.
"""
with less_console_noise():
@@ -1343,32 +1343,32 @@ class TestDomainApplicationAdmin(MockEppLib):
"status",
"organization_type",
"federal_type",
- DomainApplicationAdmin.ElectionOfficeFilter,
+ DomainRequestAdmin.ElectionOfficeFilter,
"rejection_reason",
- DomainApplicationAdmin.InvestigatorFilter,
+ DomainRequestAdmin.InvestigatorFilter,
)
self.assertEqual(readonly_fields, expected_fields)
def test_table_sorted_alphabetically(self):
"""
- This test verifies that the DomainApplicationAdmin table is sorted alphabetically
+ This test verifies that the DomainRequestAdmin table is sorted alphabetically
by the 'requested_domain__name' field.
- It creates a list of DomainApplication instances in a non-alphabetical order,
- then retrieves the queryset from the DomainApplicationAdmin and checks
+ It creates a list of DomainRequest instances in a non-alphabetical order,
+ then retrieves the queryset from the DomainRequestAdmin and checks
that it matches the expected queryset,
which is sorted alphabetically by the 'requested_domain__name' field.
"""
with less_console_noise():
- # Creates a list of DomainApplications in scrambled order
+ # Creates a list of DomainRequests in scrambled order
multiple_unalphabetical_domain_objects("application")
request = self.factory.get("/")
request.user = self.superuser
- # Get the expected list of alphabetically sorted DomainApplications
- expected_order = DomainApplication.objects.order_by("requested_domain__name")
+ # Get the expected list of alphabetically sorted DomainRequests
+ expected_order = DomainRequest.objects.order_by("requested_domain__name")
# Get the returned queryset
queryset = self.admin.get_queryset(request)
@@ -1382,11 +1382,11 @@ class TestDomainApplicationAdmin(MockEppLib):
def test_displays_investigator_filter(self):
"""
This test verifies that the investigator filter in the admin interface for
- the DomainApplication model displays correctly.
+ the DomainRequest model displays correctly.
- It creates two DomainApplication instances, each with a different investigator.
+ It creates two DomainRequest instances, each with a different investigator.
It then simulates a staff user logging in and applying the investigator filter
- on the DomainApplication admin page.
+ on the DomainRequest admin page.
We then test if the page displays the filter we expect, but we do not test
if we get back the correct response in the table. This is to isolate if
@@ -1394,8 +1394,8 @@ class TestDomainApplicationAdmin(MockEppLib):
"""
with less_console_noise():
- # Create a mock DomainApplication object, with a fake investigator
- application: DomainApplication = generic_domain_object("application", "SomeGuy")
+ # Create a mock DomainRequest object, with a fake investigator
+ application: DomainRequest = generic_domain_object("application", "SomeGuy")
investigator_user = User.objects.filter(username=application.investigator.username).get()
investigator_user.is_staff = True
investigator_user.save()
@@ -1403,7 +1403,7 @@ class TestDomainApplicationAdmin(MockEppLib):
p = "userpass"
self.client.login(username="staffuser", password=p)
response = self.client.get(
- "/admin/registrar/domainapplication/",
+ "/admin/registrar/DomainRequest/",
{
"investigator__id__exact": investigator_user.id,
},
@@ -1428,25 +1428,25 @@ class TestDomainApplicationAdmin(MockEppLib):
def test_investigator_dropdown_displays_only_staff(self):
"""
- This test verifies that the dropdown for the 'investigator' field in the DomainApplicationAdmin
+ This test verifies that the dropdown for the 'investigator' field in the DomainRequestAdmin
interface only displays users who are marked as staff.
- It creates two DomainApplication instances, one with an investigator
+ It creates two DomainRequest instances, one with an investigator
who is a staff user and another with an investigator who is not a staff user.
- It then retrieves the queryset for the 'investigator' dropdown from DomainApplicationAdmin
+ It then retrieves the queryset for the 'investigator' dropdown from DomainRequestAdmin
and checks that it matches the expected queryset, which only includes staff users.
"""
with less_console_noise():
- # Create a mock DomainApplication object, with a fake investigator
- application: DomainApplication = generic_domain_object("application", "SomeGuy")
+ # Create a mock DomainRequest object, with a fake investigator
+ application: DomainRequest = generic_domain_object("application", "SomeGuy")
investigator_user = User.objects.filter(username=application.investigator.username).get()
investigator_user.is_staff = True
investigator_user.save()
- # Create a mock DomainApplication object, with a user that is not staff
- application_2: DomainApplication = generic_domain_object("application", "SomeOtherGuy")
+ # Create a mock DomainRequest object, with a user that is not staff
+ application_2: DomainRequest = generic_domain_object("application", "SomeOtherGuy")
investigator_user_2 = User.objects.filter(username=application_2.investigator.username).get()
investigator_user_2.is_staff = False
investigator_user_2.save()
@@ -1454,10 +1454,10 @@ class TestDomainApplicationAdmin(MockEppLib):
p = "userpass"
self.client.login(username="staffuser", password=p)
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(application.pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(application.pk))
# Get the actual field from the model's meta information
- investigator_field = DomainApplication._meta.get_field("investigator")
+ investigator_field = DomainRequest._meta.get_field("investigator")
# We should only be displaying staff users, in alphabetical order
sorted_fields = ["first_name", "last_name", "email"]
@@ -1466,7 +1466,7 @@ class TestDomainApplicationAdmin(MockEppLib):
# Grab the current dropdown. We do an API call to autocomplete to get this info.
application_queryset = self.admin.formfield_for_foreignkey(investigator_field, request).queryset
user_request = self.factory.post(
- "/admin/autocomplete/?app_label=registrar&model_name=domainapplication&field_name=investigator"
+ "/admin/autocomplete/?app_label=registrar&model_name=DomainRequest&field_name=investigator"
)
user_admin = MyUserAdmin(User, self.site)
user_queryset = user_admin.get_search_results(user_request, application_queryset, None)[0]
@@ -1483,19 +1483,19 @@ class TestDomainApplicationAdmin(MockEppLib):
is displayed alphabetically
"""
with less_console_noise():
- # Create a mock DomainApplication object, with a fake investigator
- application: DomainApplication = generic_domain_object("application", "SomeGuy")
+ # Create a mock DomainRequest object, with a fake investigator
+ application: DomainRequest = generic_domain_object("application", "SomeGuy")
investigator_user = User.objects.filter(username=application.investigator.username).get()
investigator_user.is_staff = True
investigator_user.save()
- application_2: DomainApplication = generic_domain_object("application", "AGuy")
+ application_2: DomainRequest = generic_domain_object("application", "AGuy")
investigator_user_2 = User.objects.filter(username=application_2.investigator.username).get()
investigator_user_2.first_name = "AGuy"
investigator_user_2.is_staff = True
investigator_user_2.save()
- application_3: DomainApplication = generic_domain_object("application", "FinalGuy")
+ application_3: DomainRequest = generic_domain_object("application", "FinalGuy")
investigator_user_3 = User.objects.filter(username=application_3.investigator.username).get()
investigator_user_3.first_name = "FinalGuy"
investigator_user_3.is_staff = True
@@ -1522,7 +1522,7 @@ class TestDomainApplicationAdmin(MockEppLib):
super().tearDown()
Domain.objects.all().delete()
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
User.objects.all().delete()
Contact.objects.all().delete()
Website.objects.all().delete()
@@ -1617,7 +1617,7 @@ class TestDomainInformationAdmin(TestCase):
def tearDown(self):
"""Delete all Users, Domains, and UserDomainRoles"""
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
Domain.objects.all().delete()
Contact.objects.all().delete()
User.objects.all().delete()
@@ -1635,7 +1635,7 @@ class TestDomainInformationAdmin(TestCase):
"type_of_work",
"more_organization_information",
"domain",
- "domain_application",
+ "domain_request",
"submitter",
"no_other_contacts_rationale",
"anything_else",
@@ -1809,7 +1809,7 @@ class ListHeaderAdminTest(TestCase):
def setUp(self):
self.site = AdminSite()
self.factory = RequestFactory()
- self.admin = ListHeaderAdmin(model=DomainApplication, admin_site=None)
+ self.admin = ListHeaderAdmin(model=DomainRequest, admin_site=None)
self.client = Client(HTTP_HOST="localhost:8080")
self.superuser = create_superuser()
@@ -1824,7 +1824,7 @@ class ListHeaderAdminTest(TestCase):
# which handles CSRF
# Follow=True handles the redirect
response = self.client.get(
- "/admin/registrar/domainapplication/",
+ "/admin/registrar/DomainRequest/",
{
"status__exact": "started",
"investigator__id__exact": user.id,
@@ -1874,7 +1874,7 @@ class ListHeaderAdminTest(TestCase):
def tearDown(self):
# delete any applications too
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
User.objects.all().delete()
@@ -1943,7 +1943,7 @@ class AuditedAdminTest(TestCase):
return ordered_list
- def test_alphabetically_sorted_domain_application_investigator(self):
+ def test_alphabetically_sorted_domain_request_investigator(self):
"""Tests if the investigator field is alphabetically sorted by mimicking
the call event flow"""
# Creates multiple domain applications - review status does not matter
@@ -1951,16 +1951,16 @@ class AuditedAdminTest(TestCase):
# Create a mock request
application_request = self.factory.post(
- "/admin/registrar/domainapplication/{}/change/".format(applications[0].pk)
+ "/admin/registrar/DomainRequest/{}/change/".format(applications[0].pk)
)
# Get the formfield data from the application page
- application_admin = AuditedAdmin(DomainApplication, self.site)
- field = DomainApplication.investigator.field
+ application_admin = AuditedAdmin(DomainRequest, self.site)
+ field = DomainRequest.investigator.field
application_queryset = application_admin.formfield_for_foreignkey(field, application_request).queryset
request = self.factory.post(
- "/admin/autocomplete/?app_label=registrar&model_name=domainapplication&field_name=investigator"
+ "/admin/autocomplete/?app_label=registrar&model_name=DomainRequest&field_name=investigator"
)
sorted_fields = ["first_name", "last_name", "email"]
@@ -1978,23 +1978,23 @@ class AuditedAdminTest(TestCase):
)
# This test case should be refactored in general, as it is too overly specific and engineered
- def test_alphabetically_sorted_fk_fields_domain_application(self):
+ def test_alphabetically_sorted_fk_fields_domain_request(self):
with less_console_noise():
tested_fields = [
- DomainApplication.authorizing_official.field,
- DomainApplication.submitter.field,
- # DomainApplication.investigator.field,
- DomainApplication.creator.field,
- DomainApplication.requested_domain.field,
+ DomainRequest.authorizing_official.field,
+ DomainRequest.submitter.field,
+ # DomainRequest.investigator.field,
+ DomainRequest.creator.field,
+ DomainRequest.requested_domain.field,
]
# Creates multiple domain applications - review status does not matter
applications = multiple_unalphabetical_domain_objects("application")
# Create a mock request
- request = self.factory.post("/admin/registrar/domainapplication/{}/change/".format(applications[0].pk))
+ request = self.factory.post("/admin/registrar/DomainRequest/{}/change/".format(applications[0].pk))
- model_admin = AuditedAdmin(DomainApplication, self.site)
+ model_admin = AuditedAdmin(DomainRequest, self.site)
sorted_fields = []
# Typically we wouldn't want two nested for fields,
@@ -2002,7 +2002,7 @@ class AuditedAdminTest(TestCase):
# For test case purposes, this should be performant.
for field in tested_fields:
with self.subTest(field=field):
- isNamefield: bool = field == DomainApplication.requested_domain.field
+ isNamefield: bool = field == DomainRequest.requested_domain.field
if isNamefield:
sorted_fields = ["name"]
else:
@@ -2043,7 +2043,7 @@ class AuditedAdminTest(TestCase):
DomainInformation.submitter.field,
# DomainInformation.creator.field,
(DomainInformation.domain.field, ["name"]),
- (DomainInformation.domain_application.field, ["requested_domain__name"]),
+ (DomainInformation.domain_request.field, ["requested_domain__name"]),
]
# Creates multiple domain applications - review status does not matter
applications = multiple_unalphabetical_domain_objects("information")
@@ -2083,7 +2083,7 @@ class AuditedAdminTest(TestCase):
last = obj.last_name
elif field_obj == DomainInformation.domain.field:
first = obj.name
- elif field_obj == DomainInformation.domain_application.field:
+ elif field_obj == DomainInformation.domain_request.field:
first = obj.requested_domain.name
name_tuple = self.coerced_fk_field_helper(first, last, field_obj.name, ":")
@@ -2156,7 +2156,7 @@ class AuditedAdminTest(TestCase):
def tearDown(self):
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
DomainInvitation.objects.all().delete()
@@ -2342,14 +2342,14 @@ class ContactAdminTest(TestCase):
mock_warning.assert_called_once_with(
response.wsgi_request,
"
",
)
def tearDown(self):
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
Contact.objects.all().delete()
User.objects.all().delete()
diff --git a/src/registrar/tests/test_migrations.py b/src/registrar/tests/test_migrations.py
index 773a885c1..4dcfd89bb 100644
--- a/src/registrar/tests/test_migrations.py
+++ b/src/registrar/tests/test_migrations.py
@@ -34,7 +34,7 @@ class TestGroups(TestCase):
"view_logentry",
"change_contact",
"view_domain",
- "change_domainapplication",
+ "change_DomainRequest",
"change_domaininformation",
"add_domaininvitation",
"view_domaininvitation",
diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py
index f243956ff..90a3d924a 100644
--- a/src/registrar/tests/test_models.py
+++ b/src/registrar/tests/test_models.py
@@ -4,7 +4,7 @@ from unittest.mock import patch
from registrar.models import (
Contact,
- DomainApplication,
+ DomainRequest,
DomainInformation,
User,
Website,
@@ -22,34 +22,34 @@ from django_fsm import TransitionNotAllowed
# Test comment for push -- will remove
-# The DomainApplication submit method has a side effect of sending an email
+# The DomainRequest submit method has a side effect of sending an email
# with AWS SES, so mock that out in all of these test cases
@boto3_mocking.patching
-class TestDomainApplication(TestCase):
+class TestDomainRequest(TestCase):
def setUp(self):
self.started_application = completed_application(
- status=DomainApplication.ApplicationStatus.STARTED, name="started.gov"
+ status=DomainRequest.ApplicationStatus.STARTED, name="started.gov"
)
self.submitted_application = completed_application(
- status=DomainApplication.ApplicationStatus.SUBMITTED, name="submitted.gov"
+ status=DomainRequest.ApplicationStatus.SUBMITTED, name="submitted.gov"
)
self.in_review_application = completed_application(
- status=DomainApplication.ApplicationStatus.IN_REVIEW, name="in-review.gov"
+ status=DomainRequest.ApplicationStatus.IN_REVIEW, name="in-review.gov"
)
self.action_needed_application = completed_application(
- status=DomainApplication.ApplicationStatus.ACTION_NEEDED, name="action-needed.gov"
+ status=DomainRequest.ApplicationStatus.ACTION_NEEDED, name="action-needed.gov"
)
self.approved_application = completed_application(
- status=DomainApplication.ApplicationStatus.APPROVED, name="approved.gov"
+ status=DomainRequest.ApplicationStatus.APPROVED, name="approved.gov"
)
self.withdrawn_application = completed_application(
- status=DomainApplication.ApplicationStatus.WITHDRAWN, name="withdrawn.gov"
+ status=DomainRequest.ApplicationStatus.WITHDRAWN, name="withdrawn.gov"
)
self.rejected_application = completed_application(
- status=DomainApplication.ApplicationStatus.REJECTED, name="rejected.gov"
+ status=DomainRequest.ApplicationStatus.REJECTED, name="rejected.gov"
)
self.ineligible_application = completed_application(
- status=DomainApplication.ApplicationStatus.INELIGIBLE, name="ineligible.gov"
+ status=DomainRequest.ApplicationStatus.INELIGIBLE, name="ineligible.gov"
)
self.mock_client = MockSESClient()
@@ -64,19 +64,19 @@ class TestDomainApplication(TestCase):
return self.assertRaises(Exception, None, exception_type)
def test_empty_create_fails(self):
- """Can't create a completely empty domain application.
+ """Can't create a completely empty domain request.
NOTE: something about theexception this test raises messes up with the
atomic block in a custom tearDown method for the parent test class."""
with less_console_noise():
with self.assertRaisesRegex(IntegrityError, "creator"):
- DomainApplication.objects.create()
+ DomainRequest.objects.create()
def test_minimal_create(self):
"""Can create with just a creator."""
with less_console_noise():
user, _ = User.objects.get_or_create(username="testy")
- application = DomainApplication.objects.create(creator=user)
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.STARTED)
+ application = DomainRequest.objects.create(creator=user)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.STARTED)
def test_full_create(self):
"""Can create with all fields."""
@@ -86,11 +86,11 @@ class TestDomainApplication(TestCase):
com_website, _ = Website.objects.get_or_create(website="igorville.com")
gov_website, _ = Website.objects.get_or_create(website="igorville.gov")
domain, _ = DraftDomain.objects.get_or_create(name="igorville.gov")
- application = DomainApplication.objects.create(
+ application = DomainRequest.objects.create(
creator=user,
investigator=user,
- organization_type=DomainApplication.OrganizationChoices.FEDERAL,
- federal_type=DomainApplication.BranchChoices.EXECUTIVE,
+ organization_type=DomainRequest.OrganizationChoices.FEDERAL,
+ federal_type=DomainRequest.BranchChoices.EXECUTIVE,
is_election_board=False,
organization_name="Test",
address_line1="100 Main St.",
@@ -140,7 +140,7 @@ class TestDomainApplication(TestCase):
def test_status_fsm_submit_fail(self):
with less_console_noise():
user, _ = User.objects.get_or_create(username="testy")
- application = DomainApplication.objects.create(creator=user)
+ application = DomainRequest.objects.create(creator=user)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
with less_console_noise():
@@ -152,7 +152,7 @@ class TestDomainApplication(TestCase):
with less_console_noise():
user, _ = User.objects.get_or_create(username="testy")
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(creator=user, requested_domain=site)
+ application = DomainRequest.objects.create(creator=user, requested_domain=site)
# no submitter email so this emits a log warning
@@ -186,37 +186,37 @@ class TestDomainApplication(TestCase):
def test_submit_from_withdrawn_sends_email(self):
msg = "Create a withdrawn application and submit it and see if email was sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.WITHDRAWN)
+ application = completed_application(status=DomainRequest.ApplicationStatus.WITHDRAWN)
self.check_email_sent(application, msg, "submit", 1)
def test_submit_from_action_needed_does_not_send_email(self):
msg = "Create an application with ACTION_NEEDED status and submit it, check if email was not sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.ACTION_NEEDED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.ACTION_NEEDED)
self.check_email_sent(application, msg, "submit", 0)
def test_submit_from_in_review_does_not_send_email(self):
msg = "Create a withdrawn application and submit it and see if email was sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
self.check_email_sent(application, msg, "submit", 0)
def test_approve_sends_email(self):
msg = "Create an application and approve it and see if email was sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
self.check_email_sent(application, msg, "approve", 1)
def test_withdraw_sends_email(self):
msg = "Create an application and withdraw it and see if email was sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.IN_REVIEW)
+ application = completed_application(status=DomainRequest.ApplicationStatus.IN_REVIEW)
self.check_email_sent(application, msg, "withdraw", 1)
def test_reject_sends_email(self):
msg = "Create an application and reject it and see if email was sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.APPROVED)
self.check_email_sent(application, msg, "reject", 1)
def test_reject_with_prejudice_does_not_send_email(self):
msg = "Create an application and reject it with prejudice and see if email was sent."
- application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.APPROVED)
self.check_email_sent(application, msg, "reject_with_prejudice", 0)
def test_submit_transition_allowed(self):
@@ -580,14 +580,14 @@ class TestDomainApplication(TestCase):
with less_console_noise():
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.REJECTED)
- application.rejection_reason = DomainApplication.RejectionReasons.DOMAIN_PURPOSE
+ application = completed_application(status=DomainRequest.ApplicationStatus.REJECTED)
+ application.rejection_reason = DomainRequest.RejectionReasons.DOMAIN_PURPOSE
# Approve
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
application.approve()
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.APPROVED)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.APPROVED)
self.assertEqual(application.rejection_reason, None)
def test_in_review_from_rejected_clears_rejection_reason(self):
@@ -596,15 +596,15 @@ class TestDomainApplication(TestCase):
with less_console_noise():
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.REJECTED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.REJECTED)
application.domain_is_not_active = True
- application.rejection_reason = DomainApplication.RejectionReasons.DOMAIN_PURPOSE
+ application.rejection_reason = DomainRequest.RejectionReasons.DOMAIN_PURPOSE
# Approve
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
application.in_review()
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.IN_REVIEW)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.IN_REVIEW)
self.assertEqual(application.rejection_reason, None)
def test_action_needed_from_rejected_clears_rejection_reason(self):
@@ -613,15 +613,15 @@ class TestDomainApplication(TestCase):
with less_console_noise():
# Create a sample application
- application = completed_application(status=DomainApplication.ApplicationStatus.REJECTED)
+ application = completed_application(status=DomainRequest.ApplicationStatus.REJECTED)
application.domain_is_not_active = True
- application.rejection_reason = DomainApplication.RejectionReasons.DOMAIN_PURPOSE
+ application.rejection_reason = DomainRequest.RejectionReasons.DOMAIN_PURPOSE
# Approve
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
application.action_needed()
- self.assertEqual(application.status, DomainApplication.ApplicationStatus.ACTION_NEEDED)
+ self.assertEqual(application.status, DomainRequest.ApplicationStatus.ACTION_NEEDED)
self.assertEqual(application.rejection_reason, None)
def test_has_rationale_returns_true(self):
@@ -646,7 +646,7 @@ class TestDomainApplication(TestCase):
"""has_other_contacts() returns false when an application has no other_contacts"""
with less_console_noise():
application = completed_application(
- status=DomainApplication.ApplicationStatus.STARTED, name="no-others.gov", has_other_contacts=False
+ status=DomainRequest.ApplicationStatus.STARTED, name="no-others.gov", has_other_contacts=False
)
self.assertEquals(application.has_other_contacts(), False)
@@ -666,12 +666,12 @@ class TestPermissions(TestCase):
def test_approval_creates_role(self):
draft_domain, _ = DraftDomain.objects.get_or_create(name="igorville.gov")
user, _ = User.objects.get_or_create()
- application = DomainApplication.objects.create(creator=user, requested_domain=draft_domain)
+ application = DomainRequest.objects.create(creator=user, requested_domain=draft_domain)
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
with less_console_noise():
# skip using the submit method
- application.status = DomainApplication.ApplicationStatus.SUBMITTED
+ application.status = DomainRequest.ApplicationStatus.SUBMITTED
application.approve()
# should be a role for this user
@@ -691,7 +691,7 @@ class TestDomainInformation(TestCase):
self.mock_client.EMAILS_SENT.clear()
Domain.objects.all().delete()
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
User.objects.all().delete()
DraftDomain.objects.all().delete()
@@ -700,12 +700,12 @@ class TestDomainInformation(TestCase):
self.maxDiff = None
draft_domain, _ = DraftDomain.objects.get_or_create(name="igorville.gov")
user, _ = User.objects.get_or_create()
- application = DomainApplication.objects.create(creator=user, requested_domain=draft_domain, notes="test notes")
+ application = DomainRequest.objects.create(creator=user, requested_domain=draft_domain, notes="test notes")
with boto3_mocking.clients.handler_for("sesv2", self.mock_client):
with less_console_noise():
# skip using the submit method
- application.status = DomainApplication.ApplicationStatus.SUBMITTED
+ application.status = DomainRequest.ApplicationStatus.SUBMITTED
application.approve()
# should be an information present for this domain
@@ -719,7 +719,7 @@ class TestDomainInformation(TestCase):
creator=user,
domain=domain,
notes="test notes",
- domain_application=application,
+ domain_request=application,
).__dict__
# Test the two records for consistency
@@ -852,11 +852,11 @@ class TestContact(TestCase):
self.contact, _ = Contact.objects.get_or_create(user=self.user)
self.contact_as_ao, _ = Contact.objects.get_or_create(email="newguy@igorville.gov")
- self.application = DomainApplication.objects.create(creator=self.user, authorizing_official=self.contact_as_ao)
+ self.application = DomainRequest.objects.create(creator=self.user, authorizing_official=self.contact_as_ao)
def tearDown(self):
super().tearDown()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
Contact.objects.all().delete()
User.objects.all().delete()
diff --git a/src/registrar/tests/test_models_domain.py b/src/registrar/tests/test_models_domain.py
index d99eaa25c..65b1e2504 100644
--- a/src/registrar/tests/test_models_domain.py
+++ b/src/registrar/tests/test_models_domain.py
@@ -12,7 +12,7 @@ from django.utils.timezone import make_aware
from registrar.models import Domain, Host, HostIP
from unittest import skip
-from registrar.models.domain_application import DomainApplication
+from registrar.models.domain_request import DomainRequest
from registrar.models.domain_information import DomainInformation
from registrar.models.draft_domain import DraftDomain
from registrar.models.public_contact import PublicContact
@@ -311,25 +311,25 @@ class TestDomainCache(MockEppLib):
class TestDomainCreation(MockEppLib):
- """Rule: An approved domain application must result in a domain"""
+ """Rule: An approved domain request must result in a domain"""
@boto3_mocking.patching
def test_approved_application_creates_domain_locally(self):
"""
- Scenario: Analyst approves a domain application
- When the DomainApplication transitions to approved
+ Scenario: Analyst approves a domain request
+ When the DomainRequest transitions to approved
Then a Domain exists in the database with the same `name`
But a domain object does not exist in the registry
"""
with less_console_noise():
draft_domain, _ = DraftDomain.objects.get_or_create(name="igorville.gov")
user, _ = User.objects.get_or_create()
- application = DomainApplication.objects.create(creator=user, requested_domain=draft_domain)
+ application = DomainRequest.objects.create(creator=user, requested_domain=draft_domain)
mock_client = MockSESClient()
with boto3_mocking.clients.handler_for("sesv2", mock_client):
# skip using the submit method
- application.status = DomainApplication.ApplicationStatus.SUBMITTED
+ application.status = DomainRequest.ApplicationStatus.SUBMITTED
# transition to approve state
application.approve()
# should have information present for this domain
@@ -395,7 +395,7 @@ class TestDomainCreation(MockEppLib):
def tearDown(self) -> None:
DomainInformation.objects.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
PublicContact.objects.all().delete()
Domain.objects.all().delete()
User.objects.all().delete()
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index 8f9a8e4fc..655cece4a 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -5,7 +5,7 @@ from .common import MockEppLib # type: ignore
from registrar.models import (
- DomainApplication,
+ DomainRequest,
DomainInformation,
)
import logging
@@ -47,7 +47,7 @@ class TestWithUser(MockEppLib):
def tearDown(self):
# delete any applications too
super().tearDown()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
DomainInformation.objects.all().delete()
self.user.delete()
diff --git a/src/registrar/tests/test_views_application.py b/src/registrar/tests/test_views_application.py
index 7da906a8f..f19c6c41d 100644
--- a/src/registrar/tests/test_views_application.py
+++ b/src/registrar/tests/test_views_application.py
@@ -10,7 +10,7 @@ from django_webtest import WebTest # type: ignore
import boto3_mocking # type: ignore
from registrar.models import (
- DomainApplication,
+ DomainRequest,
DraftDomain,
Domain,
DomainInformation,
@@ -29,8 +29,8 @@ import logging
logger = logging.getLogger(__name__)
-class DomainApplicationTests(TestWithUser, WebTest):
- """Webtests for domain application to test filling and submitting."""
+class DomainRequestTests(TestWithUser, WebTest):
+ """Webtests for domain request to test filling and submitting."""
# Doesn't work with CSRF checking
# hypothesis is that CSRF_USE_SESSIONS is incompatible with WebTest
@@ -48,7 +48,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
def test_application_form_intro_is_skipped_when_edit_access(self):
"""Tests that user is NOT presented with intro acknowledgement page when accessed through 'edit'"""
- completed_application(status=DomainApplication.ApplicationStatus.STARTED, user=self.user)
+ completed_application(status=DomainRequest.ApplicationStatus.STARTED, user=self.user)
home_page = self.app.get("/")
self.assertContains(home_page, "city.gov")
# click the "Edit" link
@@ -146,7 +146,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
type_result = type_form.submit()
# should see results in db
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.organization_type, "federal")
# the post request should return a redirect to the next form in
# the application
@@ -166,7 +166,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
federal_result = federal_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.federal_type, "executive")
# the post request should return a redirect to the next form in
# the application
@@ -193,7 +193,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
org_contact_result = org_contact_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.organization_name, "Testorg")
self.assertEqual(application.address_line1, "address 1")
self.assertEqual(application.address_line2, "address 2")
@@ -221,7 +221,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
ao_result = ao_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.authorizing_official.first_name, "Testy ATO")
self.assertEqual(application.authorizing_official.last_name, "Tester ATO")
self.assertEqual(application.authorizing_official.title, "Chief Tester")
@@ -243,7 +243,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
current_sites_result = current_sites_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(
application.current_websites.filter(website="http://www.city.com").count(),
1,
@@ -265,7 +265,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
dotgov_result = dotgov_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.requested_domain.name, "city.gov")
self.assertEqual(application.alternative_domains.filter(website="city1.gov").count(), 1)
# the post request should return a redirect to the next form in
@@ -285,7 +285,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
purpose_result = purpose_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.purpose, "For all kinds of things.")
# the post request should return a redirect to the next form in
# the application
@@ -309,7 +309,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
your_contact_result = your_contact_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.submitter.first_name, "Testy you")
self.assertEqual(application.submitter.last_name, "Tester you")
self.assertEqual(application.submitter.title, "Admin Tester")
@@ -342,7 +342,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_result = other_contacts_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(
application.other_contacts.filter(
first_name="Testy2",
@@ -371,7 +371,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
anything_else_result = anything_else_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.anything_else, "Nothing else.")
# the post request should return a redirect to the next form in
# the application
@@ -391,7 +391,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
requirements_result = requirements_form.submit()
# validate that data from this step are being saved
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(application.is_policy_acknowledged, True)
# the post request should return a redirect to the next form in
# the application
@@ -663,7 +663,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
type_form = type_page.forms[0]
- type_form["organization_type-organization_type"] = DomainApplication.OrganizationChoices.INTERSTATE
+ type_form["organization_type-organization_type"] = DomainRequest.OrganizationChoices.INTERSTATE
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
type_result = type_form.submit()
@@ -708,7 +708,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
type_form = type_page.forms[0]
- type_form["organization_type-organization_type"] = DomainApplication.OrganizationChoices.SPECIAL_DISTRICT
+ type_form["organization_type-organization_type"] = DomainRequest.OrganizationChoices.SPECIAL_DISTRICT
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
type_result = type_page.forms[0].submit()
# follow first redirect
@@ -803,7 +803,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# Verify that the no_other_contacts_rationale we saved earlier has been removed from the database
- application = DomainApplication.objects.get()
+ application = DomainRequest.objects.get()
self.assertEqual(
application.other_contacts.count(),
1,
@@ -845,7 +845,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# Verify that the no_other_contacts_rationale we saved earlier has been removed from the database
- application = DomainApplication.objects.get()
+ application = DomainRequest.objects.get()
self.assertEqual(
application.other_contacts.count(),
0,
@@ -859,7 +859,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
def test_submitting_no_other_contacts_rationale_removes_reference_other_contacts_when_joined(self):
"""When a user submits the Other Contacts form with no other contacts selected, the application's
other contacts references get removed for other contacts that exist and are joined to other objects"""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has 1 "other contact" assigned to it
# We'll do it from scratch so we can reuse the other contact
ao, _ = Contact.objects.get_or_create(
@@ -883,7 +883,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy2@town.com",
phone="(555) 555 5557",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -929,7 +929,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# Verify that the no_other_contacts_rationale we saved earlier is no longer associated with the application
- application = DomainApplication.objects.get()
+ application = DomainRequest.objects.get()
self.assertEqual(
application.other_contacts.count(),
0,
@@ -986,7 +986,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
This formset uses the DJANGO DELETE widget. We'll test that by setting 2 contacts on an application,
loading the form and marking one contact up for deletion."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has 2 "other contact" assigned to it
# We'll do it from scratch so we can reuse the other contact
ao, _ = Contact.objects.get_or_create(
@@ -1017,7 +1017,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy3@town.com",
phone="(201) 555 5557",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1061,13 +1061,13 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# Verify that the first dude was deleted
- application = DomainApplication.objects.get()
+ application = DomainRequest.objects.get()
self.assertEqual(application.other_contacts.count(), 1)
self.assertEqual(application.other_contacts.first().first_name, "Testy3")
def test_delete_other_contact_does_not_allow_zero_contacts(self):
"""Delete Other Contact does not allow submission with zero contacts."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has 1 "other contact" assigned to it
# We'll do it from scratch so we can reuse the other contact
ao, _ = Contact.objects.get_or_create(
@@ -1091,7 +1091,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy2@town.com",
phone="(201) 555 5557",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1133,7 +1133,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# Verify that the contact was not deleted
- application = DomainApplication.objects.get()
+ application = DomainRequest.objects.get()
self.assertEqual(application.other_contacts.count(), 1)
self.assertEqual(application.other_contacts.first().first_name, "Testy2")
@@ -1144,7 +1144,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
3. then submit,
The forms on page reload shows all the required fields and their errors."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has 1 "other contact" assigned to it
# We'll do it from scratch so we can reuse the other contact
ao, _ = Contact.objects.get_or_create(
@@ -1168,7 +1168,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy2@town.com",
phone="(201) 555 5557",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1220,7 +1220,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
2. then submit,
The application is linked to the existing contact, and the existing contact updated."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has 1 "other contact" assigned to it
# We'll do it from scratch
ao, _ = Contact.objects.get_or_create(
@@ -1244,7 +1244,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy2@town.com",
phone="(201) 555 5557",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1301,7 +1301,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
2. then submit,
The application is linked to a new contact, and the new contact is updated."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has 1 "other contact" assigned to it, the other contact is also
# the authorizing official initially
# We'll do it from scratch
@@ -1319,7 +1319,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy-admin@town.com",
phone="(201) 555 5556",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1381,7 +1381,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
2. then submit,
The application is linked to the existing ao, and the ao updated."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has an authorizing_official (ao)
# We'll do it from scratch
ao, _ = Contact.objects.get_or_create(
@@ -1391,7 +1391,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy@town.com",
phone="(201) 555 5555",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1446,7 +1446,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
2. then submit,
The application is linked to a new Contact, and the new Contact is updated."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has authorizing official assigned to it, the authorizing offical is also
# an other contact initially
# We'll do it from scratch
@@ -1457,7 +1457,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy@town.com",
phone="(201) 555 5555",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1518,7 +1518,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
2. then submit,
The application is linked to the existing submitter, and the submitter updated."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has a submitter
# We'll do it from scratch
you, _ = Contact.objects.get_or_create(
@@ -1528,7 +1528,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy@town.com",
phone="(201) 555 5555",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1582,7 +1582,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
2. then submit,
The application is linked to a new Contact, and the new Contact is updated."""
- # Populate the database with a domain application that
+ # Populate the database with a domain request that
# has submitter assigned to it, the submitter is also
# an other contact initially
# We'll do it from scratch
@@ -1593,7 +1593,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy@town.com",
phone="(201) 555 5555",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -1667,7 +1667,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
type_form = type_page.forms[0]
- type_form["organization_type-organization_type"] = DomainApplication.OrganizationChoices.INTERSTATE
+ type_form["organization_type-organization_type"] = DomainRequest.OrganizationChoices.INTERSTATE
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
type_result = type_form.submit()
# follow first redirect
@@ -1695,7 +1695,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
type_form = type_page.forms[0]
- type_form["organization_type-organization_type"] = DomainApplication.OrganizationChoices.TRIBAL
+ type_form["organization_type-organization_type"] = DomainRequest.OrganizationChoices.TRIBAL
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
type_result = type_form.submit()
# the tribal government page comes immediately afterwards
@@ -1900,7 +1900,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.assertEqual(value, "https://example.com")
self.assertIn("current_sites-1-website", current_sites_form.fields)
# and it is correctly referenced in the ManyToOne relationship
- application = DomainApplication.objects.get() # there's only one
+ application = DomainRequest.objects.get() # there's only one
self.assertEqual(
application.current_websites.filter(website="https://example.com").count(),
1,
@@ -1935,7 +1935,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
email="testy2@town.com",
phone="(555) 555 5557",
)
- application, _ = DomainApplication.objects.get_or_create(
+ application, _ = DomainRequest.objects.get_or_create(
organization_type="federal",
federal_type="executive",
purpose="Purpose of the site",
@@ -2068,7 +2068,7 @@ class DomainApplicationTests(TestWithUser, WebTest):
self.assertContains(review_page, "You are about to submit an incomplete request")
-class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
+class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
def setUp(self):
super().setUp()
self.app.set_user(self.user.username)
@@ -2076,7 +2076,7 @@ class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
def test_application_status(self):
"""Checking application status page"""
- application = completed_application(status=DomainApplication.ApplicationStatus.SUBMITTED, user=self.user)
+ application = completed_application(status=DomainRequest.ApplicationStatus.SUBMITTED, user=self.user)
application.save()
home_page = self.app.get("/")
@@ -2096,7 +2096,7 @@ class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
self.user.status = "ineligible"
self.user.save()
- application = completed_application(status=DomainApplication.ApplicationStatus.SUBMITTED, user=self.user)
+ application = completed_application(status=DomainRequest.ApplicationStatus.SUBMITTED, user=self.user)
application.save()
home_page = self.app.get("/")
@@ -2111,7 +2111,7 @@ class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
def test_application_withdraw(self):
"""Checking application status page"""
- application = completed_application(status=DomainApplication.ApplicationStatus.SUBMITTED, user=self.user)
+ application = completed_application(status=DomainRequest.ApplicationStatus.SUBMITTED, user=self.user)
application.save()
home_page = self.app.get("/")
@@ -2146,7 +2146,7 @@ class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
"""Can't withdraw applications as a restricted user."""
self.user.status = User.RESTRICTED
self.user.save()
- application = completed_application(status=DomainApplication.ApplicationStatus.SUBMITTED, user=self.user)
+ application = completed_application(status=DomainRequest.ApplicationStatus.SUBMITTED, user=self.user)
application.save()
home_page = self.app.get("/")
@@ -2171,7 +2171,7 @@ class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
def test_application_status_no_permissions(self):
"""Can't access applications without being the creator."""
- application = completed_application(status=DomainApplication.ApplicationStatus.SUBMITTED, user=self.user)
+ application = completed_application(status=DomainRequest.ApplicationStatus.SUBMITTED, user=self.user)
other_user = User()
other_user.save()
application.creator = other_user
@@ -2191,7 +2191,7 @@ class DomainApplicationTestDifferentStatuses(TestWithUser, WebTest):
def test_approved_application_not_in_active_requests(self):
"""An approved application is not shown in the Active
Requests table on home.html."""
- application = completed_application(status=DomainApplication.ApplicationStatus.APPROVED, user=self.user)
+ application = completed_application(status=DomainRequest.ApplicationStatus.APPROVED, user=self.user)
application.save()
home_page = self.app.get("/")
@@ -2222,7 +2222,7 @@ class TestWizardUnlockingSteps(TestWithUser, WebTest):
def test_unlocked_steps_full_application(self):
"""Test when all fields in the application are filled."""
- completed_application(status=DomainApplication.ApplicationStatus.STARTED, user=self.user)
+ completed_application(status=DomainRequest.ApplicationStatus.STARTED, user=self.user)
# Make a request to the home page
home_page = self.app.get("/")
# django-webtest does not handle cookie-based sessions well because it keeps
@@ -2280,10 +2280,10 @@ class TestWizardUnlockingSteps(TestWithUser, WebTest):
contact_user, _ = Contact.objects.get_or_create(user=self.user)
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(
+ application = DomainRequest.objects.create(
creator=self.user,
requested_domain=site,
- status=DomainApplication.ApplicationStatus.WITHDRAWN,
+ status=DomainRequest.ApplicationStatus.WITHDRAWN,
authorizing_official=contact,
submitter=contact_user,
)
@@ -2341,11 +2341,11 @@ class HomeTests(TestWithUser):
super().tearDown()
Contact.objects.all().delete()
- def test_home_lists_domain_applications(self):
+ def test_home_lists_domain_requests(self):
response = self.client.get("/")
self.assertNotContains(response, "igorville.gov")
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(creator=self.user, requested_domain=site)
+ application = DomainRequest.objects.create(creator=self.user, requested_domain=site)
response = self.client.get("/")
# count = 7 because of screenreader content
@@ -2464,12 +2464,12 @@ class HomeTests(TestWithUser):
# Check that we have the right text content.
self.assertContains(response, unknown_text, count=1)
- def test_home_deletes_withdrawn_domain_application(self):
- """Tests if the user can delete a DomainApplication in the 'withdrawn' status"""
+ def test_home_deletes_withdrawn_domain_request(self):
+ """Tests if the user can delete a DomainRequest in the 'withdrawn' status"""
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(
- creator=self.user, requested_domain=site, status=DomainApplication.ApplicationStatus.WITHDRAWN
+ application = DomainRequest.objects.create(
+ creator=self.user, requested_domain=site, status=DomainRequest.ApplicationStatus.WITHDRAWN
)
# Ensure that igorville.gov exists on the page
@@ -2488,12 +2488,12 @@ class HomeTests(TestWithUser):
# clean up
application.delete()
- def test_home_deletes_started_domain_application(self):
- """Tests if the user can delete a DomainApplication in the 'started' status"""
+ def test_home_deletes_started_domain_request(self):
+ """Tests if the user can delete a DomainRequest in the 'started' status"""
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(
- creator=self.user, requested_domain=site, status=DomainApplication.ApplicationStatus.STARTED
+ application = DomainRequest.objects.create(
+ creator=self.user, requested_domain=site, status=DomainRequest.ApplicationStatus.STARTED
)
# Ensure that igorville.gov exists on the page
@@ -2512,20 +2512,20 @@ class HomeTests(TestWithUser):
# clean up
application.delete()
- def test_home_doesnt_delete_other_domain_applications(self):
+ def test_home_doesnt_delete_other_domain_requests(self):
"""Tests to ensure the user can't delete Applications not in the status of STARTED or WITHDRAWN"""
# Given that we are including a subset of items that can be deleted while excluding the rest,
# subTest is appropriate here as otherwise we would need many duplicate tests for the same reason.
with less_console_noise():
draft_domain = DraftDomain.objects.create(name="igorville.gov")
- for status in DomainApplication.ApplicationStatus:
+ for status in DomainRequest.ApplicationStatus:
if status not in [
- DomainApplication.ApplicationStatus.STARTED,
- DomainApplication.ApplicationStatus.WITHDRAWN,
+ DomainRequest.ApplicationStatus.STARTED,
+ DomainRequest.ApplicationStatus.WITHDRAWN,
]:
with self.subTest(status=status):
- application = DomainApplication.objects.create(
+ application = DomainRequest.objects.create(
creator=self.user, requested_domain=draft_domain, status=status
)
@@ -2537,16 +2537,16 @@ class HomeTests(TestWithUser):
# Check for a 403 error - the end user should not be allowed to do this
self.assertEqual(response.status_code, 403)
- desired_application = DomainApplication.objects.filter(requested_domain=draft_domain)
+ desired_application = DomainRequest.objects.filter(requested_domain=draft_domain)
- # Make sure the DomainApplication wasn't deleted
+ # Make sure the DomainRequest wasn't deleted
self.assertEqual(desired_application.count(), 1)
# clean up
application.delete()
- def test_home_deletes_domain_application_and_orphans(self):
- """Tests if delete for DomainApplication deletes orphaned Contact objects"""
+ def test_home_deletes_domain_request_and_orphans(self):
+ """Tests if delete for DomainRequest deletes orphaned Contact objects"""
# Create the site and contacts to delete (orphaned)
contact = Contact.objects.create(
@@ -2568,10 +2568,10 @@ class HomeTests(TestWithUser):
contact_user, _ = Contact.objects.get_or_create(user=self.user)
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(
+ application = DomainRequest.objects.create(
creator=self.user,
requested_domain=site,
- status=DomainApplication.ApplicationStatus.WITHDRAWN,
+ status=DomainRequest.ApplicationStatus.WITHDRAWN,
authorizing_official=contact,
submitter=contact_user,
)
@@ -2579,10 +2579,10 @@ class HomeTests(TestWithUser):
# Create a second application to attach contacts to
site_2 = DraftDomain.objects.create(name="teaville.gov")
- application_2 = DomainApplication.objects.create(
+ application_2 = DomainRequest.objects.create(
creator=self.user,
requested_domain=site_2,
- status=DomainApplication.ApplicationStatus.STARTED,
+ status=DomainRequest.ApplicationStatus.STARTED,
authorizing_official=contact_2,
submitter=contact_shared,
)
@@ -2616,7 +2616,7 @@ class HomeTests(TestWithUser):
self.assertEqual(edge_case, contact_2)
- def test_home_deletes_domain_application_and_shared_orphans(self):
+ def test_home_deletes_domain_request_and_shared_orphans(self):
"""Test the edge case for an object that will become orphaned after a delete
(but is not an orphan at the time of deletion)"""
@@ -2640,10 +2640,10 @@ class HomeTests(TestWithUser):
contact_user, _ = Contact.objects.get_or_create(user=self.user)
site = DraftDomain.objects.create(name="igorville.gov")
- application = DomainApplication.objects.create(
+ application = DomainRequest.objects.create(
creator=self.user,
requested_domain=site,
- status=DomainApplication.ApplicationStatus.WITHDRAWN,
+ status=DomainRequest.ApplicationStatus.WITHDRAWN,
authorizing_official=contact,
submitter=contact_user,
)
@@ -2651,10 +2651,10 @@ class HomeTests(TestWithUser):
# Create a second application to attach contacts to
site_2 = DraftDomain.objects.create(name="teaville.gov")
- application_2 = DomainApplication.objects.create(
+ application_2 = DomainRequest.objects.create(
creator=self.user,
requested_domain=site_2,
- status=DomainApplication.ApplicationStatus.STARTED,
+ status=DomainRequest.ApplicationStatus.STARTED,
authorizing_official=contact_2,
submitter=contact_shared,
)
@@ -2679,7 +2679,7 @@ class HomeTests(TestWithUser):
"You’re about to start your .gov domain request.",
)
- def test_domain_application_form_with_ineligible_user(self):
+ def test_domain_request_form_with_ineligible_user(self):
"""Application form not accessible for an ineligible user.
This test should be solid enough since all application wizard
views share the same permissions class"""
diff --git a/src/registrar/tests/test_views_domain.py b/src/registrar/tests/test_views_domain.py
index 59b5faaa9..90b987020 100644
--- a/src/registrar/tests/test_views_domain.py
+++ b/src/registrar/tests/test_views_domain.py
@@ -21,7 +21,7 @@ from registrar.utility.errors import (
)
from registrar.models import (
- DomainApplication,
+ DomainRequest,
Domain,
DomainInformation,
DomainInvitation,
@@ -120,7 +120,7 @@ class TestWithDomainPermissions(TestWithUser):
UserDomainRole.objects.all().delete()
if hasattr(self.domain, "contacts"):
self.domain.contacts.all().delete()
- DomainApplication.objects.all().delete()
+ DomainRequest.objects.all().delete()
DomainInformation.objects.all().delete()
PublicContact.objects.all().delete()
HostIP.objects.all().delete()
@@ -311,7 +311,7 @@ class TestDomainDetail(TestDomainOverview):
def test_domain_detail_with_no_information_or_application(self):
"""Test that domain management page returns 200 and displays error
- when no domain information or domain application exist"""
+ when no domain information or domain request exist"""
with less_console_noise():
# have to use staff user for this test
staff_user = create_user()
diff --git a/src/registrar/views/application.py b/src/registrar/views/application.py
index b71018d81..4c3ffe306 100644
--- a/src/registrar/views/application.py
+++ b/src/registrar/views/application.py
@@ -9,16 +9,16 @@ from django.views.generic import TemplateView
from django.contrib import messages
from registrar.forms import application_wizard as forms
-from registrar.models import DomainApplication
+from registrar.models import DomainRequest
from registrar.models.contact import Contact
from registrar.models.user import User
from registrar.utility import StrEnum
from registrar.views.utility import StepsHelper
-from registrar.views.utility.permission_views import DomainApplicationPermissionDeleteView
+from registrar.views.utility.permission_views import DomainRequestPermissionDeleteView
from .utility import (
- DomainApplicationPermissionView,
- DomainApplicationPermissionWithdrawView,
+ DomainRequestPermissionView,
+ DomainRequestPermissionWithdrawView,
ApplicationWizardPermissionView,
)
@@ -54,7 +54,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
"""
A common set of methods and configuration.
- The registrar's domain application is several pages of "steps".
+ The registrar's domain request is several pages of "steps".
Together, these steps constitute a "wizard".
This base class sets up a shared state (stored in the user's session)
@@ -111,7 +111,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
self._application = None # for caching
def has_pk(self):
- """Does this wizard know about a DomainApplication database record?"""
+ """Does this wizard know about a DomainRequest database record?"""
return "application_id" in self.storage
@property
@@ -122,9 +122,9 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
return "wizard_application"
@property
- def application(self) -> DomainApplication:
+ def application(self) -> DomainRequest:
"""
- Attempt to match the current wizard with a DomainApplication.
+ Attempt to match the current wizard with a DomainRequest.
Will create an application if none exists.
"""
@@ -142,15 +142,15 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
if self.has_pk():
id = self.storage["application_id"]
try:
- self._application = DomainApplication.objects.get(
+ self._application = DomainRequest.objects.get(
creator=creator,
pk=id,
)
return self._application
- except DomainApplication.DoesNotExist:
- logger.debug("Application id %s did not have a DomainApplication" % id)
+ except DomainRequest.DoesNotExist:
+ logger.debug("Application id %s did not have a DomainRequest" % id)
- self._application = DomainApplication.objects.create(creator=self.request.user)
+ self._application = DomainRequest.objects.create(creator=self.request.user)
self.storage["application_id"] = self._application.id
return self._application
@@ -236,7 +236,7 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
context["forms"] = self.get_forms()
# if pending requests exist and user does not have approved domains,
- # present message that domain application cannot be submitted
+ # present message that domain request cannot be submitted
pending_requests = self.pending_requests()
if len(pending_requests) > 0:
message_header = "You cannot submit this request yet"
@@ -310,8 +310,8 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
def approved_applications_exist(self):
"""Checks if user is creator of applications with ApplicationStatus.APPROVED status"""
- approved_application_count = DomainApplication.objects.filter(
- creator=self.request.user, status=DomainApplication.ApplicationStatus.APPROVED
+ approved_application_count = DomainRequest.objects.filter(
+ creator=self.request.user, status=DomainRequest.ApplicationStatus.APPROVED
).count()
return approved_application_count > 0
@@ -326,14 +326,14 @@ class ApplicationWizard(ApplicationWizardPermissionView, TemplateView):
"""Returns a List of user's applications with one of the following states:
ApplicationStatus.SUBMITTED, ApplicationStatus.IN_REVIEW, ApplicationStatus.ACTION_NEEDED"""
# if the current application has ApplicationStatus.ACTION_NEEDED status, this check should not be performed
- if self.application.status == DomainApplication.ApplicationStatus.ACTION_NEEDED:
+ if self.application.status == DomainRequest.ApplicationStatus.ACTION_NEEDED:
return []
check_statuses = [
- DomainApplication.ApplicationStatus.SUBMITTED,
- DomainApplication.ApplicationStatus.IN_REVIEW,
- DomainApplication.ApplicationStatus.ACTION_NEEDED,
+ DomainRequest.ApplicationStatus.SUBMITTED,
+ DomainRequest.ApplicationStatus.IN_REVIEW,
+ DomainRequest.ApplicationStatus.ACTION_NEEDED,
]
- return DomainApplication.objects.filter(creator=self.request.user, status__in=check_statuses)
+ return DomainRequest.objects.filter(creator=self.request.user, status__in=check_statuses)
def db_check_for_unlocking_steps(self):
"""Helper for get_context_data
@@ -635,21 +635,21 @@ class Finished(ApplicationWizard):
return render(self.request, self.template_name, context)
-class ApplicationStatus(DomainApplicationPermissionView):
+class ApplicationStatus(DomainRequestPermissionView):
template_name = "application_status.html"
-class ApplicationWithdrawConfirmation(DomainApplicationPermissionWithdrawView):
+class ApplicationWithdrawConfirmation(DomainRequestPermissionWithdrawView):
"""This page will ask user to confirm if they want to withdraw
- The DomainApplicationPermissionView restricts access so that only the
+ The DomainRequestPermissionView restricts access so that only the
`creator` of the application may withdraw it.
"""
template_name = "application_withdraw_confirmation.html"
-class ApplicationWithdrawn(DomainApplicationPermissionWithdrawView):
+class ApplicationWithdrawn(DomainRequestPermissionWithdrawView):
# this view renders no template
template_name = ""
@@ -659,16 +659,16 @@ class ApplicationWithdrawn(DomainApplicationPermissionWithdrawView):
If user click on withdraw confirm button, this view updates the status
to withdraw and send back to homepage.
"""
- application = DomainApplication.objects.get(id=self.kwargs["pk"])
+ application = DomainRequest.objects.get(id=self.kwargs["pk"])
application.withdraw()
application.save()
return HttpResponseRedirect(reverse("home"))
-class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
- """Delete view for home that allows the end user to delete DomainApplications"""
+class DomainRequestDeleteView(DomainRequestPermissionDeleteView):
+ """Delete view for home that allows the end user to delete DomainRequests"""
- object: DomainApplication # workaround for type mismatch in DeleteView
+ object: DomainRequest # workaround for type mismatch in DeleteView
def has_permission(self):
"""Custom override for has_permission to exclude all statuses, except WITHDRAWN and STARTED"""
@@ -677,7 +677,7 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
return False
status = self.get_object().status
- valid_statuses = [DomainApplication.ApplicationStatus.WITHDRAWN, DomainApplication.ApplicationStatus.STARTED]
+ valid_statuses = [DomainRequest.ApplicationStatus.WITHDRAWN, DomainRequest.ApplicationStatus.STARTED]
if status not in valid_statuses:
return False
@@ -689,10 +689,10 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
def post(self, request, *args, **kwargs):
# Grab all orphaned contacts
- application: DomainApplication = self.get_object()
+ application: DomainRequest = self.get_object()
contacts_to_delete, duplicates = self._get_orphaned_contacts(application)
- # Delete the DomainApplication
+ # Delete the DomainRequest
response = super().post(request, *args, **kwargs)
# Delete orphaned contacts - but only for if they are not associated with a user
@@ -707,16 +707,16 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
return response
- def _get_orphaned_contacts(self, application: DomainApplication, check_db=False):
+ def _get_orphaned_contacts(self, application: DomainRequest, check_db=False):
"""
- Collects all orphaned contacts associated with a given DomainApplication object.
+ Collects all orphaned contacts associated with a given DomainRequest object.
An orphaned contact is defined as a contact that is associated with the application,
but not with any other application. This includes the authorizing official, the submitter,
and any other contacts linked to the application.
Parameters:
- application (DomainApplication): The DomainApplication object for which to find orphaned contacts.
+ application (DomainRequest): The DomainRequest object for which to find orphaned contacts.
check_db (bool, optional): A flag indicating whether to check the database for the existence of the contacts.
Defaults to False.
@@ -726,7 +726,7 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
"""
contacts_to_delete = []
- # Get each contact object on the DomainApplication object
+ # Get each contact object on the DomainRequest object
ao = application.authorizing_official
submitter = application.submitter
other_contacts = list(application.other_contacts.all())
diff --git a/src/registrar/views/index.py b/src/registrar/views/index.py
index 367e5c315..c14341109 100644
--- a/src/registrar/views/index.py
+++ b/src/registrar/views/index.py
@@ -1,6 +1,6 @@
from django.shortcuts import render
-from registrar.models import DomainApplication, Domain, UserDomainRole
+from registrar.models import DomainRequest, Domain, UserDomainRole
def index(request):
@@ -10,7 +10,7 @@ def index(request):
# Get all domain applications the user has access to
applications, deletable_applications = _get_applications(request)
- context["domain_applications"] = applications
+ context["domain_requests"] = applications
# Get all domains the user has access to
domains = _get_domains(request)
@@ -35,19 +35,19 @@ def index(request):
def _get_applications(request):
"""Given the current request,
- get all DomainApplications that are associated with the UserDomainRole object.
+ get all DomainRequests that are associated with the UserDomainRole object.
Returns a tuple of all applications, and those that are deletable by the user.
"""
# Let's exclude the approved applications since our
- # domain_applications context will be used to populate
+ # domain_requests context will be used to populate
# the active applications table
- applications = DomainApplication.objects.filter(creator=request.user).exclude(
- status=DomainApplication.ApplicationStatus.APPROVED
+ applications = DomainRequest.objects.filter(creator=request.user).exclude(
+ status=DomainRequest.ApplicationStatus.APPROVED
)
# Create a placeholder DraftDomain for each incomplete draft
- valid_statuses = [DomainApplication.ApplicationStatus.STARTED, DomainApplication.ApplicationStatus.WITHDRAWN]
+ valid_statuses = [DomainRequest.ApplicationStatus.STARTED, DomainRequest.ApplicationStatus.WITHDRAWN]
deletable_applications = applications.filter(status__in=valid_statuses)
return (applications, deletable_applications)
diff --git a/src/registrar/views/utility/__init__.py b/src/registrar/views/utility/__init__.py
index 3d1a64628..b5d910a98 100644
--- a/src/registrar/views/utility/__init__.py
+++ b/src/registrar/views/utility/__init__.py
@@ -3,8 +3,8 @@ from .always_404 import always_404
from .permission_views import (
DomainPermissionView,
- DomainApplicationPermissionView,
- DomainApplicationPermissionWithdrawView,
+ DomainRequestPermissionView,
+ DomainRequestPermissionWithdrawView,
DomainInvitationPermissionDeleteView,
ApplicationWizardPermissionView,
)
diff --git a/src/registrar/views/utility/mixins.py b/src/registrar/views/utility/mixins.py
index 8de75e151..51dadc439 100644
--- a/src/registrar/views/utility/mixins.py
+++ b/src/registrar/views/utility/mixins.py
@@ -4,7 +4,7 @@ from django.contrib.auth.mixins import PermissionRequiredMixin
from registrar.models import (
Domain,
- DomainApplication,
+ DomainRequest,
DomainInvitation,
DomainInformation,
UserDomainRole,
@@ -230,10 +230,10 @@ class DomainPermission(PermissionsLoginMixin):
# Analysts may manage domains, when they are in these statuses:
valid_domain_statuses = [
- DomainApplication.ApplicationStatus.APPROVED,
- DomainApplication.ApplicationStatus.IN_REVIEW,
- DomainApplication.ApplicationStatus.REJECTED,
- DomainApplication.ApplicationStatus.ACTION_NEEDED,
+ DomainRequest.ApplicationStatus.APPROVED,
+ DomainRequest.ApplicationStatus.IN_REVIEW,
+ DomainRequest.ApplicationStatus.REJECTED,
+ DomainRequest.ApplicationStatus.ACTION_NEEDED,
# Edge case - some domains do not have
# a status or DomainInformation... aka a status of 'None'.
# It is necessary to access those to correct errors.
@@ -246,12 +246,12 @@ class DomainPermission(PermissionsLoginMixin):
# if no domain information or application exist, the user
# should be able to manage the domain; however, if domain information
- # and domain application exist, and application is not in valid status,
+ # and domain request exist, and application is not in valid status,
# user should not be able to manage domain
if (
requested_domain
- and requested_domain.domain_application
- and requested_domain.domain_application.status not in valid_domain_statuses
+ and requested_domain.domain_request
+ and requested_domain.domain_request.status not in valid_domain_statuses
):
return False
@@ -261,12 +261,12 @@ class DomainPermission(PermissionsLoginMixin):
return True
-class DomainApplicationPermission(PermissionsLoginMixin):
- """Permission mixin that redirects to domain application if user
+class DomainRequestPermission(PermissionsLoginMixin):
+ """Permission mixin that redirects to domain request if user
has access, otherwise 403"""
def has_permission(self):
- """Check if this user has access to this domain application.
+ """Check if this user has access to this domain request.
The user is in self.request.user and the domain needs to be looked
up from the domain's primary key in self.kwargs["pk"]
@@ -275,9 +275,9 @@ class DomainApplicationPermission(PermissionsLoginMixin):
return False
# user needs to be the creator of the application
- # this query is empty if there isn't a domain application with this
+ # this query is empty if there isn't a domain request with this
# id and this user as creator
- if not DomainApplication.objects.filter(creator=self.request.user, id=self.kwargs["pk"]).exists():
+ if not DomainRequest.objects.filter(creator=self.request.user, id=self.kwargs["pk"]).exists():
return False
return True
@@ -288,7 +288,7 @@ class UserDeleteDomainRolePermission(PermissionsLoginMixin):
has access, otherwise 403"""
def has_permission(self):
- """Check if this user has access to this domain application.
+ """Check if this user has access to this domain request.
The user is in self.request.user and the domain needs to be looked
up from the domain's primary key in self.kwargs["pk"]
@@ -319,19 +319,19 @@ class UserDeleteDomainRolePermission(PermissionsLoginMixin):
return True
-class DomainApplicationPermissionWithdraw(PermissionsLoginMixin):
- """Permission mixin that redirects to withdraw action on domain application
+class DomainRequestPermissionWithdraw(PermissionsLoginMixin):
+ """Permission mixin that redirects to withdraw action on domain request
if user has access, otherwise 403"""
def has_permission(self):
- """Check if this user has access to withdraw this domain application."""
+ """Check if this user has access to withdraw this domain request."""
if not self.request.user.is_authenticated:
return False
# user needs to be the creator of the application
- # this query is empty if there isn't a domain application with this
+ # this query is empty if there isn't a domain request with this
# id and this user as creator
- if not DomainApplication.objects.filter(creator=self.request.user, id=self.kwargs["pk"]).exists():
+ if not DomainRequest.objects.filter(creator=self.request.user, id=self.kwargs["pk"]).exists():
return False
# Restricted users should not be able to withdraw domain requests
@@ -342,7 +342,7 @@ class DomainApplicationPermissionWithdraw(PermissionsLoginMixin):
class ApplicationWizardPermission(PermissionsLoginMixin):
- """Permission mixin that redirects to start or edit domain application if
+ """Permission mixin that redirects to start or edit domain request if
user has access, otherwise 403"""
def has_permission(self):
diff --git a/src/registrar/views/utility/permission_views.py b/src/registrar/views/utility/permission_views.py
index 02d3db96d..4cfab714c 100644
--- a/src/registrar/views/utility/permission_views.py
+++ b/src/registrar/views/utility/permission_views.py
@@ -3,13 +3,13 @@
import abc # abstract base class
from django.views.generic import DetailView, DeleteView, TemplateView
-from registrar.models import Domain, DomainApplication, DomainInvitation
+from registrar.models import Domain, DomainRequest, DomainInvitation
from registrar.models.user_domain_role import UserDomainRole
from .mixins import (
DomainPermission,
- DomainApplicationPermission,
- DomainApplicationPermissionWithdraw,
+ DomainRequestPermission,
+ DomainRequestPermissionWithdraw,
DomainInvitationPermission,
ApplicationWizardPermission,
UserDeleteDomainRolePermission,
@@ -56,7 +56,7 @@ class DomainPermissionView(DomainPermission, DetailView, abc.ABC):
raise NotImplementedError
-class DomainApplicationPermissionView(DomainApplicationPermission, DetailView, abc.ABC):
+class DomainRequestPermissionView(DomainRequestPermission, DetailView, abc.ABC):
"""Abstract base view for domain applications that enforces permissions
This abstract view cannot be instantiated. Actual views must specify
@@ -64,9 +64,9 @@ class DomainApplicationPermissionView(DomainApplicationPermission, DetailView, a
"""
# DetailView property for what model this is viewing
- model = DomainApplication
+ model = DomainRequest
# variable name in template context for the model object
- context_object_name = "domainapplication"
+ context_object_name = "DomainRequest"
# Abstract property enforces NotImplementedError on an attribute.
@property
@@ -75,17 +75,17 @@ class DomainApplicationPermissionView(DomainApplicationPermission, DetailView, a
raise NotImplementedError
-class DomainApplicationPermissionWithdrawView(DomainApplicationPermissionWithdraw, DetailView, abc.ABC):
- """Abstract base view for domain application withdraw function
+class DomainRequestPermissionWithdrawView(DomainRequestPermissionWithdraw, DetailView, abc.ABC):
+ """Abstract base view for domain request withdraw function
This abstract view cannot be instantiated. Actual views must specify
`template_name`.
"""
# DetailView property for what model this is viewing
- model = DomainApplication
+ model = DomainRequest
# variable name in template context for the model object
- context_object_name = "domainapplication"
+ context_object_name = "DomainRequest"
# Abstract property enforces NotImplementedError on an attribute.
@property
@@ -121,11 +121,11 @@ class DomainInvitationPermissionDeleteView(DomainInvitationPermission, DeleteVie
object: DomainInvitation # workaround for type mismatch in DeleteView
-class DomainApplicationPermissionDeleteView(DomainApplicationPermission, DeleteView, abc.ABC):
- """Abstract view for deleting a DomainApplication."""
+class DomainRequestPermissionDeleteView(DomainRequestPermission, DeleteView, abc.ABC):
+ """Abstract view for deleting a DomainRequest."""
- model = DomainApplication
- object: DomainApplication
+ model = DomainRequest
+ object: DomainRequest
class UserDomainRolePermissionDeleteView(UserDeleteDomainRolePermission, DeleteView, abc.ABC):
From 0eafad3fb6055c56d46e1ea3141c217287c22174 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 29 Feb 2024 15:29:00 -0700
Subject: [PATCH 02/29] Renaming files, lots and lots of find-replace (with
manual, step-through inspections where needed). Still IN PROGRESS and I'm
sure there are breakages that need repair at this stage...
---
.github/ISSUE_TEMPLATE/bug.yml | 4 +-
.../decisions/0015-use-django-fsm.md | 4 +-
.../decisions/0016-django-form-wizard.md | 6 +-
docs/architecture/decisions/0017-ses-email.md | 2 +-
.../decisions/0021-django-admin.md | 3 +-
.../0022-submit-domain-request-user-flow.md | 4 +-
docs/architecture/diagrams/model_timeline.md | 2 +-
docs/developer/README.md | 8 +-
docs/developer/generating-emails-guide.md | 8 +-
docs/operations/README.md | 2 +-
src/registrar/admin.py | 38 +-
src/registrar/config/urls.py | 20 +-
...cations.py => fixtures_domain_requests.py} | 30 +-
src/registrar/forms/__init__.py | 2 +-
...ion_wizard.py => domain_request_wizard.py} | 32 +-
src/registrar/management/commands/load.py | 2 +-
src/registrar/models/domain_information.py | 8 +-
...omain_application.py => domain_request.py} | 118 ++---
...main_request_about_your_organization.html} | 2 +-
...html => domain_request_anything_else.html} | 2 +-
... domain_request_authorizing_official.html} | 2 +-
...html => domain_request_current_sites.html} | 2 +-
...ion_done.html => domain_request_done.html} | 0
...html => domain_request_dotgov_domain.html} | 2 +-
...ion_form.html => domain_request_form.html} | 4 +-
...n_intro.html => domain_request_intro.html} | 0
...t.html => domain_request_org_contact.html} | 2 +-
....html => domain_request_org_election.html} | 2 +-
...l.html => domain_request_org_federal.html} | 2 +-
...type.html => domain_request_org_type.html} | 2 +-
...tml => domain_request_other_contacts.html} | 2 +-
...rpose.html => domain_request_purpose.html} | 2 +-
....html => domain_request_requirements.html} | 2 +-
...review.html => domain_request_review.html} | 118 ++---
...debar.html => domain_request_sidebar.html} | 2 +-
...status.html => domain_request_status.html} | 0
... => domain_request_tribal_government.html} | 2 +-
...domain_request_withdraw_confirmation.html} | 0
....html => domain_request_your_contact.html} | 2 +-
.../emails/domain_request_withdrawn.txt | 6 +-
.../domain_request_withdrawn_subject.txt | 2 +-
.../emails/includes/application_summary.txt | 58 +--
.../emails/status_change_approved.txt | 6 +-
.../emails/status_change_approved_subject.txt | 2 +-
.../emails/status_change_rejected.txt | 28 +-
.../emails/status_change_rejected_subject.txt | 2 +-
.../emails/submission_confirmation.txt | 8 +-
.../submission_confirmation_subject.txt | 2 +-
src/registrar/templates/home.html | 50 +-
src/registrar/tests/common.py | 64 +--
src/registrar/tests/test_admin.py | 326 +++++++-------
src/registrar/tests/test_emails.py | 46 +-
src/registrar/tests/test_forms.py | 2 +-
src/registrar/tests/test_models.py | 350 +++++++-------
src/registrar/tests/test_models_domain.py | 8 +-
.../test_transition_domain_migrations.py | 2 +-
src/registrar/tests/test_views.py | 4 +-
src/registrar/tests/test_views_application.py | 426 +++++++++---------
src/registrar/tests/test_views_domain.py | 2 +-
src/registrar/views/__init__.py | 2 +-
.../{application.py => domain_request.py} | 252 +++++------
src/registrar/views/index.py | 20 +-
src/registrar/views/utility/__init__.py | 2 +-
src/registrar/views/utility/mixins.py | 16 +-
.../views/utility/permission_views.py | 8 +-
65 files changed, 1069 insertions(+), 1070 deletions(-)
rename src/registrar/{fixtures_applications.py => fixtures_domain_requests.py} (89%)
rename src/registrar/forms/{application_wizard.py => domain_request_wizard.py} (97%)
rename src/registrar/models/{domain_application.py => domain_request.py} (90%)
rename src/registrar/templates/{application_about_your_organization.html => domain_request_about_your_organization.html} (95%)
rename src/registrar/templates/{application_anything_else.html => domain_request_anything_else.html} (92%)
rename src/registrar/templates/{application_authorizing_official.html => domain_request_authorizing_official.html} (96%)
rename src/registrar/templates/{application_current_sites.html => domain_request_current_sites.html} (96%)
rename src/registrar/templates/{application_done.html => domain_request_done.html} (100%)
rename src/registrar/templates/{application_dotgov_domain.html => domain_request_dotgov_domain.html} (98%)
rename src/registrar/templates/{application_form.html => domain_request_form.html} (96%)
rename src/registrar/templates/{application_intro.html => domain_request_intro.html} (100%)
rename src/registrar/templates/{application_org_contact.html => domain_request_org_contact.html} (96%)
rename src/registrar/templates/{application_org_election.html => domain_request_org_election.html} (94%)
rename src/registrar/templates/{application_org_federal.html => domain_request_org_federal.html} (91%)
rename src/registrar/templates/{application_org_type.html => domain_request_org_type.html} (92%)
rename src/registrar/templates/{application_other_contacts.html => domain_request_other_contacts.html} (99%)
rename src/registrar/templates/{application_purpose.html => domain_request_purpose.html} (95%)
rename src/registrar/templates/{application_requirements.html => domain_request_requirements.html} (98%)
rename src/registrar/templates/{application_review.html => domain_request_review.html} (58%)
rename src/registrar/templates/{application_sidebar.html => domain_request_sidebar.html} (95%)
rename src/registrar/templates/{application_status.html => domain_request_status.html} (100%)
rename src/registrar/templates/{application_tribal_government.html => domain_request_tribal_government.html} (96%)
rename src/registrar/templates/{application_withdraw_confirmation.html => domain_request_withdraw_confirmation.html} (100%)
rename src/registrar/templates/{application_your_contact.html => domain_request_your_contact.html} (95%)
rename src/registrar/views/{application.py => domain_request.py} (75%)
diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml
index d4d3497ac..559be3fca 100644
--- a/.github/ISSUE_TEMPLATE/bug.yml
+++ b/.github/ISSUE_TEMPLATE/bug.yml
@@ -33,8 +33,8 @@ body:
How can the issue be reliably reproduced? Feel free to include screenshots or other supporting artifacts
Example:
- 1. In the test environment, fill out the application for a new domain
- 2. Click the button to trigger a save/submit on the final page and complete the application
+ 1. In the test environment, fill out the domain request for a new domain
+ 2. Click the button to trigger a save/submit on the final page and complete the domain request
3. See the error
value: |
1.
diff --git a/docs/architecture/decisions/0015-use-django-fsm.md b/docs/architecture/decisions/0015-use-django-fsm.md
index c291f509f..4c4aa7e36 100644
--- a/docs/architecture/decisions/0015-use-django-fsm.md
+++ b/docs/architecture/decisions/0015-use-django-fsm.md
@@ -15,7 +15,7 @@ rules in the application code that control what changes are permitted to the
statuses are called “domain logic”.
In a large piece of software, domain logic often spreads around the code base
-because while handling a single request like “mark this application as
+because while handling a single request like “mark this domain request as
approved”, requirements can be enforced at many different points during the
process.
@@ -28,7 +28,7 @@ states and can change states (or “transition”) according to fixed rules.
We will use the django-fsm library to represent the status of our domain
registration applications as a finite state machine. The library allows us to
list what statuses are possible and describe which state transitions are
-possible (e.g. Can an approved application ever be marked as “in-process”?).
+possible (e.g. Can an approved domain request ever be marked as “in-process”?).
## Consequences
diff --git a/docs/architecture/decisions/0016-django-form-wizard.md b/docs/architecture/decisions/0016-django-form-wizard.md
index 1d0bf0852..afbfb7edf 100644
--- a/docs/architecture/decisions/0016-django-form-wizard.md
+++ b/docs/architecture/decisions/0016-django-form-wizard.md
@@ -8,11 +8,11 @@ Accepted
## Context
-The application form by which registrants apply for a .gov domain is presented over many pages.
+The domain request form by which registrants apply for a .gov domain is presented over many pages.
-Because we use server-side rendering, each page of the application is a unique HTML page with form fields surrounded by a form tag.
+Because we use server-side rendering, each page of the domain request is a unique HTML page with form fields surrounded by a form tag.
-Needing a way to coordinate state between the pages as a user fills in their application, we initially used the Form wizard from [django-formtools](https://django-formtools.readthedocs.io/en/latest/wizard.html). This eventually proved unworkable due to the lack of native ability to have more than one Django form object displayed on a single HTML page.
+Needing a way to coordinate state between the pages as a user fills in their domain request, we initially used the Form wizard from [django-formtools](https://django-formtools.readthedocs.io/en/latest/wizard.html). This eventually proved unworkable due to the lack of native ability to have more than one Django form object displayed on a single HTML page.
However, a significant portion of the user workflow had already been coded, so it seemed prudent to port some of the formtools logic into our codebase.
diff --git a/docs/architecture/decisions/0017-ses-email.md b/docs/architecture/decisions/0017-ses-email.md
index 6559cbb4e..d39a4aa68 100644
--- a/docs/architecture/decisions/0017-ses-email.md
+++ b/docs/architecture/decisions/0017-ses-email.md
@@ -9,7 +9,7 @@ Approved
## Context
Our application needs to be able to send email to applicants for various
-purposes including notifying them that their application has been submitted.
+purposes including notifying them that their domain request has been submitted.
We need infrastructure for programmatically sending email. Amazon Web Services
(AWS) provides the Simple Email Service (SES) that can do that. CISA can
provide access to AWS SES for our application.
diff --git a/docs/architecture/decisions/0021-django-admin.md b/docs/architecture/decisions/0021-django-admin.md
index add6992cd..31715a9cf 100644
--- a/docs/architecture/decisions/0021-django-admin.md
+++ b/docs/architecture/decisions/0021-django-admin.md
@@ -8,8 +8,7 @@ Accepted
## Context
-CISA needs a way to perform administrative actions to manage the new get.gov application as well as the .gov domain
-application requests submitted. Analysts need to be able to view, review, and approve domain applications. Other
+CISA needs a way to perform administrative actions to manage the new get.gov application as well as the .gov domain requests submitted. Analysts need to be able to view, review, and approve domain requests. Other
dashboard views, reports, searches (with filters and sorting) are also highly desired.
## Decision
diff --git a/docs/architecture/decisions/0022-submit-domain-request-user-flow.md b/docs/architecture/decisions/0022-submit-domain-request-user-flow.md
index e0e94fc16..c28579113 100644
--- a/docs/architecture/decisions/0022-submit-domain-request-user-flow.md
+++ b/docs/architecture/decisions/0022-submit-domain-request-user-flow.md
@@ -12,9 +12,9 @@ Historically, the .gov vendor managed initial identity verification and organiza
## Considered Options
-**Option 1:** Users will not be able to submit any new applications if they have 0 prior approved applications OR prior registered .gov domains. We would add a page alert informing the user that they cannot submit their application because they have an application in one of these "3" statuses (Submitted, In Review or Action Needed). They would still be able to create and edit new applications, just not submit them. The benefits of this option are that it would allow users to have multiple applications essentially in "draft mode" that are queued up and ready for submission after they are permitted to submit.
+**Option 1:** Users will not be able to submit any new applications if they have 0 prior approved applications OR prior registered .gov domains. We would add a page alert informing the user that they cannot submit their application because they have a domain request in one of these "3" statuses (Submitted, In Review or Action Needed). They would still be able to create and edit new applications, just not submit them. The benefits of this option are that it would allow users to have multiple applications essentially in "draft mode" that are queued up and ready for submission after they are permitted to submit.
-**Option 2:** Users will not be able to submit any new applications if they have 0 prior approved applications OR prior registered .gov domains. Additionally, we would remove the ability to edit any application with the started/withdrawn/rejected status, or start a new application. The benefit of this option is that a user would not be able to begin an action (submitting an application) that they are not allowed to complete.
+**Option 2:** Users will not be able to submit any new applications if they have 0 prior approved applications OR prior registered .gov domains. Additionally, we would remove the ability to edit any application with the started/withdrawn/rejected status, or start a new application. The benefit of this option is that a user would not be able to begin an action (submitting a domain request) that they are not allowed to complete.
## Decision
diff --git a/docs/architecture/diagrams/model_timeline.md b/docs/architecture/diagrams/model_timeline.md
index 47e449162..42aad16e1 100644
--- a/docs/architecture/diagrams/model_timeline.md
+++ b/docs/architecture/diagrams/model_timeline.md
@@ -5,7 +5,7 @@ This diagram connects the data models along with various workflow stages.
1. The applicant starts the process at `/request` interacting with the
`DomainRequest` object.
-2. The analyst approves the application using the `DomainRequest`'s
+2. The analyst approves the domain request using the `DomainRequest`'s
`approve()` method which creates many related objects: `UserDomainRole`,
`Domain`, and `DomainInformation`.
diff --git a/docs/developer/README.md b/docs/developer/README.md
index dc4c9ddd2..e28c57378 100644
--- a/docs/developer/README.md
+++ b/docs/developer/README.md
@@ -78,7 +78,7 @@ Get the secrets from Cloud.gov by running `cf env getgov-YOURSANDBOX`. More info
The endpoint /admin can be used to view and manage site content, including but not limited to user information and the list of current applications in the database. To be able to view and use /admin locally:
1. Login via login.gov
-2. Go to the home page and make sure you can see the part where you can submit an application
+2. Go to the home page and make sure you can see the part where you can submit a domain request
3. Go to /admin and it will tell you that UUID is not authorized, copy that UUID for use in 4
4. in src/registrar/fixtures_users.py add to the `ADMINS` list in that file by adding your UUID as your username along with your first and last name. See below:
@@ -93,14 +93,14 @@ The endpoint /admin can be used to view and manage site content, including but n
]
```
-5. In the browser, navigate to /admin. To verify that all is working correctly, under "domain applications" you should see fake domains with various fake statuses.
+5. In the browser, navigate to /admin. To verify that all is working correctly, under "domain requests" you should see fake domains with various fake statuses.
6. Add an optional email key/value pair
### Adding an Analyst to /admin
Analysts are a variant of the admin role with limited permissions. The process for adding an Analyst is much the same as adding an admin:
1. Login via login.gov (if you already exist as an admin, you will need to create a separate login.gov account for this: i.e. first.last+1@email.com)
-2. Go to the home page and make sure you can see the part where you can submit an application
+2. Go to the home page and make sure you can see the part where you can submit a domain request
3. Go to /admin and it will tell you that UUID is not authorized, copy that UUID for use in 4 (this will be a different UUID than the one obtained from creating an admin)
4. in src/registrar/fixtures_users.py add to the `STAFF` list in that file by adding your UUID as your username along with your first and last name. See below:
@@ -145,7 +145,7 @@ You can change the logging verbosity, if needed. Do a web search for "django log
## Mock data
-[load.py](../../src/registrar/management/commands/load.py) called from docker-compose (locally) and reset-db.yml (upper) loads the fixtures from [fixtures_user.py](../../src/registrar/fixtures_users.py) and [fixtures_applications.py](../../src/registrar/fixtures_applications.py), giving you some test data to play with while developing.
+[load.py](../../src/registrar/management/commands/load.py) called from docker-compose (locally) and reset-db.yml (upper) loads the fixtures from [fixtures_user.py](../../src/registrar/fixtures_users.py) and [fixtures_domain_requests.py](../../src/registrar/fixtures_domain_requests.py), giving you some test data to play with while developing.
See the [database-access README](./database-access.md) for information on how to pull data to update these fixtures.
diff --git a/docs/developer/generating-emails-guide.md b/docs/developer/generating-emails-guide.md
index 0a97a8bc6..dd0a55e64 100644
--- a/docs/developer/generating-emails-guide.md
+++ b/docs/developer/generating-emails-guide.md
@@ -24,8 +24,8 @@
## Status Change Approved
- Starting Location: Django Admin
- Workflow: Analyst Admin
-- Workflow Step: Click "Domain applications" -> Click an application in a status of "submitted", "In review", "rejected", or "ineligible" -> Click status dropdown -> (select "approved") -> click "Save"
-- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create an application, then set the status to "approved". This will send you an email.
+- Workflow Step: Click "domain requests" -> Click a domain request in a status of "submitted", "In review", "rejected", or "ineligible" -> Click status dropdown -> (select "approved") -> click "Save"
+- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create a domain request, then set the status to "approved". This will send you an email.
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_approved.txt)
### Status Change Approved Subject
@@ -35,8 +35,8 @@
## Status Change Rejected
- Starting Location: Django Admin
- Workflow: Analyst Admin
-- Workflow Step: Click "Domain applications" -> Click an application in a status of "In review", or "approved" -> Click status dropdown -> (select "rejected") -> click "Save"
-- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create an application, then set the status to "in review" (and click save). Then, go back to the same application and set the status to "rejected". This will send you an email.
+- Workflow Step: Click "domain requests" -> Click a domain request in a status of "In review", or "approved" -> Click status dropdown -> (select "rejected") -> click "Save"
+- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create a domain request, then set the status to "in review" (and click save). Then, go back to the same application and set the status to "rejected". This will send you an email.
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_rejected.txt)
### Status Change Rejected Subject
diff --git a/docs/operations/README.md b/docs/operations/README.md
index 0bd55ab51..9aaee4c86 100644
--- a/docs/operations/README.md
+++ b/docs/operations/README.md
@@ -114,7 +114,7 @@ that can be used for specific tasks.
## Cloud.gov dashboard
At there is a list for all of the
-applications that a Cloud.gov user has access to. Clicking on an application
+applications that a Cloud.gov user has access to. Clicking on a domain request
goes to a screen for that individual application, e.g.
.
On that page is a left-hand link for "Log Stream" e.g.
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index a985a971e..3d2d194b3 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -85,15 +85,15 @@ class DomainRequestAdminForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
- application = kwargs.get("instance")
- if application and application.pk:
- current_state = application.status
+ domain_request = kwargs.get("instance")
+ if domain_request and domain_request.pk:
+ current_state = domain_request.status
# first option in status transitions is current state
- available_transitions = [(current_state, application.get_status_display())]
+ available_transitions = [(current_state, domain_request.get_status_display())]
transitions = get_available_FIELD_transitions(
- application, models.DomainRequest._meta.get_field("status")
+ domain_request, models.DomainRequest._meta.get_field("status")
)
for transition in transitions:
@@ -102,7 +102,7 @@ class DomainRequestAdminForm(forms.ModelForm):
# only set the available transitions if the user is not restricted
# from editing the domain request; otherwise, the form will be
# readonly and the status field will not have a widget
- if not application.creator.is_restricted():
+ if not domain_request.creator.is_restricted():
self.fields["status"].widget.choices = available_transitions
@@ -867,7 +867,7 @@ class DomainInformationAdmin(ListHeaderAdmin):
class DomainRequestAdmin(ListHeaderAdmin):
- """Custom domain applications admin class."""
+ """Custom domain requests admin class."""
form = DomainRequestAdminForm
@@ -1061,8 +1061,8 @@ class DomainRequestAdmin(ListHeaderAdmin):
if (
obj
- and original_obj.status == models.DomainRequest.ApplicationStatus.APPROVED
- and obj.status != models.DomainRequest.ApplicationStatus.APPROVED
+ and original_obj.status == models.DomainRequest.DomainRequestStatus.APPROVED
+ and obj.status != models.DomainRequest.DomainRequestStatus.APPROVED
and not obj.domain_is_not_active()
):
# If an admin tried to set an approved application to
@@ -1082,7 +1082,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
elif (
obj
- and obj.status == models.DomainRequest.ApplicationStatus.REJECTED
+ and obj.status == models.DomainRequest.DomainRequestStatus.REJECTED
and not obj.rejection_reason
):
# This condition should never be triggered.
@@ -1100,14 +1100,14 @@ class DomainRequestAdmin(ListHeaderAdmin):
else:
if obj.status != original_obj.status:
status_method_mapping = {
- models.DomainRequest.ApplicationStatus.STARTED: None,
- models.DomainRequest.ApplicationStatus.SUBMITTED: obj.submit,
- models.DomainRequest.ApplicationStatus.IN_REVIEW: obj.in_review,
- models.DomainRequest.ApplicationStatus.ACTION_NEEDED: obj.action_needed,
- models.DomainRequest.ApplicationStatus.APPROVED: obj.approve,
- models.DomainRequest.ApplicationStatus.WITHDRAWN: obj.withdraw,
- models.DomainRequest.ApplicationStatus.REJECTED: obj.reject,
- models.DomainRequest.ApplicationStatus.INELIGIBLE: (obj.reject_with_prejudice),
+ models.DomainRequest.DomainRequestStatus.STARTED: None,
+ models.DomainRequest.DomainRequestStatus.SUBMITTED: obj.submit,
+ models.DomainRequest.DomainRequestStatus.IN_REVIEW: obj.in_review,
+ models.DomainRequest.DomainRequestStatus.ACTION_NEEDED: obj.action_needed,
+ models.DomainRequest.DomainRequestStatus.APPROVED: obj.approve,
+ models.DomainRequest.DomainRequestStatus.WITHDRAWN: obj.withdraw,
+ models.DomainRequest.DomainRequestStatus.REJECTED: obj.reject,
+ models.DomainRequest.DomainRequestStatus.INELIGIBLE: (obj.reject_with_prejudice),
}
selected_method = status_method_mapping.get(obj.status)
if selected_method is None:
@@ -1158,7 +1158,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
if obj and obj.creator.status == models.User.RESTRICTED:
messages.warning(
request,
- "Cannot edit an application with a restricted creator.",
+ "Cannot edit a domain request with a restricted creator.",
)
def change_view(self, request, object_id, form_url="", extra_context=None):
diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py
index 153c3448f..f23dcf53f 100644
--- a/src/registrar/config/urls.py
+++ b/src/registrar/config/urls.py
@@ -13,18 +13,18 @@ from registrar import views
from registrar.views.admin_views import ExportData
-from registrar.views.application import Step
+from registrar.views.domain_request import Step
from registrar.views.utility import always_404
from api.views import available, get_current_federal, get_current_full
-APPLICATION_NAMESPACE = views.ApplicationWizard.URL_NAMESPACE
-application_urls = [
- path("", views.ApplicationWizard.as_view(), name=""),
+DOMAIN_REQUEST_NAMESPACE = views.DomainRequestWizard.URL_NAMESPACE
+domain_request_urls = [
+ path("", views.DomainRequestWizard.as_view(), name=""),
path("finished/", views.Finished.as_view(), name="finished"),
]
-# dynamically generate the other application_urls
+# dynamically generate the other domain_request_urls
for step, view in [
# add/remove steps here
(Step.ORGANIZATION_TYPE, views.OrganizationType),
@@ -43,7 +43,7 @@ for step, view in [
(Step.REQUIREMENTS, views.Requirements),
(Step.REVIEW, views.Review),
]:
- application_urls.append(path(f"{step}/", view.as_view(), name=step))
+ domain_request_urls.append(path(f"{step}/", view.as_view(), name=step))
urlpatterns = [
@@ -56,12 +56,12 @@ urlpatterns = [
path("admin/", admin.site.urls),
path(
"application//edit/",
- views.ApplicationWizard.as_view(),
- name=views.ApplicationWizard.EDIT_URL_NAME,
+ views.DomainRequestWizard.as_view(),
+ name=views.DomainRequestWizard.EDIT_URL_NAME,
),
path(
"application/",
- views.ApplicationStatus.as_view(),
+ views.DomainRequestStatus.as_view(),
name="application-status",
),
path(
@@ -76,7 +76,7 @@ urlpatterns = [
),
path("health", views.health, name="health"),
path("openid/", include("djangooidc.urls")),
- path("request/", include((application_urls, APPLICATION_NAMESPACE))),
+ path("request/", include((domain_request_urls, DOMAIN_REQUEST_NAMESPACE))),
path("api/v1/available/", available, name="available"),
path("api/v1/get-report/current-federal", get_current_federal, name="get-current-federal"),
path("api/v1/get-report/current-full", get_current_full, name="get-current-full"),
diff --git a/src/registrar/fixtures_applications.py b/src/registrar/fixtures_domain_requests.py
similarity index 89%
rename from src/registrar/fixtures_applications.py
rename to src/registrar/fixtures_domain_requests.py
index cfba61fa9..a78bdd1ab 100644
--- a/src/registrar/fixtures_applications.py
+++ b/src/registrar/fixtures_domain_requests.py
@@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
class DomainRequestFixture:
"""
- Load domain applications into the database.
+ Load domain requests into the database.
Make sure this class' `load` method is called from `handle`
in management/commands/load.py, then use `./manage.py load`
@@ -49,27 +49,27 @@ class DomainRequestFixture:
# },
DA = [
{
- "status": DomainRequest.ApplicationStatus.STARTED,
+ "status": DomainRequest.DomainRequestStatus.STARTED,
"organization_name": "Example - Finished but not submitted",
},
{
- "status": DomainRequest.ApplicationStatus.SUBMITTED,
+ "status": DomainRequest.DomainRequestStatus.SUBMITTED,
"organization_name": "Example - Submitted but pending investigation",
},
{
- "status": DomainRequest.ApplicationStatus.IN_REVIEW,
+ "status": DomainRequest.DomainRequestStatus.IN_REVIEW,
"organization_name": "Example - In investigation",
},
{
- "status": DomainRequest.ApplicationStatus.IN_REVIEW,
+ "status": DomainRequest.DomainRequestStatus.IN_REVIEW,
"organization_name": "Example - Approved",
},
{
- "status": DomainRequest.ApplicationStatus.WITHDRAWN,
+ "status": DomainRequest.DomainRequestStatus.WITHDRAWN,
"organization_name": "Example - Withdrawn",
},
{
- "status": DomainRequest.ApplicationStatus.ACTION_NEEDED,
+ "status": DomainRequest.DomainRequestStatus.ACTION_NEEDED,
"organization_name": "Example - Action needed",
},
{
@@ -176,8 +176,8 @@ class DomainRequestFixture:
@classmethod
def load(cls):
- """Creates domain applications for each user in the database."""
- logger.info("Going to load %s domain applications" % len(cls.DA))
+ """Creates domain requests for each user in the database."""
+ logger.info("Going to load %s domain requests" % len(cls.DA))
try:
users = list(User.objects.all()) # force evaluation to catch db errors
except Exception as e:
@@ -185,7 +185,7 @@ class DomainRequestFixture:
return
for user in users:
- logger.debug("Loading domain applications for %s" % user)
+ logger.debug("Loading domain requests for %s" % user)
for app in cls.DA:
try:
da, _ = DomainRequest.objects.get_or_create(
@@ -213,12 +213,12 @@ class DomainFixture(DomainRequestFixture):
for user in users:
# approve one of each users in review status domains
- application = DomainRequest.objects.filter(
- creator=user, status=DomainRequest.ApplicationStatus.IN_REVIEW
+ domain_request = DomainRequest.objects.filter(
+ creator=user, status=DomainRequest.DomainRequestStatus.IN_REVIEW
).last()
- logger.debug(f"Approving {application} for {user}")
+ logger.debug(f"Approving {domain_request} for {user}")
# We don't want fixtures sending out real emails to
# fake email addresses, so we just skip that and log it instead
- application.approve(send_email=False)
- application.save()
+ domain_request.approve(send_email=False)
+ domain_request.save()
diff --git a/src/registrar/forms/__init__.py b/src/registrar/forms/__init__.py
index 914db375c..be3b634f6 100644
--- a/src/registrar/forms/__init__.py
+++ b/src/registrar/forms/__init__.py
@@ -1,4 +1,4 @@
-from .application_wizard import *
+from .domain_request_wizard import *
from .domain import (
DomainAddUserForm,
NameserverFormset,
diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/domain_request_wizard.py
similarity index 97%
rename from src/registrar/forms/application_wizard.py
rename to src/registrar/forms/domain_request_wizard.py
index ed81bf8a9..c9e90d935 100644
--- a/src/registrar/forms/application_wizard.py
+++ b/src/registrar/forms/domain_request_wizard.py
@@ -29,8 +29,8 @@ class RegistrarForm(forms.Form):
def __init__(self, *args, **kwargs):
kwargs.setdefault("label_suffix", "")
- # save a reference to an application object
- self.application = kwargs.pop("application", None)
+ # save a reference to a domain request object
+ self.domain_request = kwargs.pop("domain_request", None)
super(RegistrarForm, self).__init__(*args, **kwargs)
def to_database(self, obj: DomainRequest | Contact):
@@ -61,8 +61,8 @@ class RegistrarFormSet(forms.BaseFormSet):
"""
def __init__(self, *args, **kwargs):
- # save a reference to an application object
- self.application = kwargs.pop("application", None)
+ # save a reference to an domain_request object
+ self.domain_request = kwargs.pop("domain_request", None)
super(RegistrarFormSet, self).__init__(*args, **kwargs)
# quick workaround to ensure that the HTML `required`
# attribute shows up on required fields for any forms
@@ -137,14 +137,14 @@ class RegistrarFormSet(forms.BaseFormSet):
if should_delete(cleaned):
if hasattr(db_obj, "has_more_than_one_join") and db_obj.has_more_than_one_join(related_name):
# Remove the specific relationship without deleting the object
- getattr(db_obj, related_name).remove(self.application)
+ getattr(db_obj, related_name).remove(self.domain_request)
else:
# If there are no other relationships, delete the object
db_obj.delete()
else:
if hasattr(db_obj, "has_more_than_one_join") and db_obj.has_more_than_one_join(related_name):
# create a new db_obj and disconnect existing one
- getattr(db_obj, related_name).remove(self.application)
+ getattr(db_obj, related_name).remove(self.domain_request)
kwargs = pre_create(db_obj, cleaned)
getattr(obj, join).create(**kwargs)
else:
@@ -170,7 +170,7 @@ class RegistrarFormSet(forms.BaseFormSet):
class OrganizationTypeForm(RegistrarForm):
organization_type = forms.ChoiceField(
- # use the long names in the application form
+ # use the long names in the domain request form
choices=DomainRequest.OrganizationChoicesVerbose.choices,
widget=forms.RadioSelect,
error_messages={"required": "Select the type of organization you represent."},
@@ -201,7 +201,7 @@ class TribalGovernmentForm(RegistrarForm):
# into a link. There should be no user-facing input in the
# HTML indicated here.
mark_safe( # nosec
- "You can’t complete this application yet. "
+ "You can’t complete this domain request yet. "
"Only tribes recognized by the U.S. federal government "
"or by a U.S. state government are eligible for .gov "
'domains. Use our contact form to '
@@ -294,8 +294,8 @@ class OrganizationContactForm(RegistrarForm):
def clean_federal_agency(self):
"""Require something to be selected when this is a federal agency."""
federal_agency = self.cleaned_data.get("federal_agency", None)
- # need the application object to know if this is federal
- if self.application is None:
+ # need the domain request object to know if this is federal
+ if self.domain_request is None:
# hmm, no saved application object?, default require the agency
if not federal_agency:
# no answer was selected
@@ -303,7 +303,7 @@ class OrganizationContactForm(RegistrarForm):
"Select the federal agency your organization is in.",
code="required",
)
- if self.application.is_federal():
+ if self.domain_request.is_federal():
if not federal_agency:
# no answer was selected
raise forms.ValidationError(
@@ -530,7 +530,7 @@ class YourContactForm(RegistrarForm):
if not self.is_valid():
return
contact = getattr(obj, "submitter", None)
- if contact is not None and not contact.has_more_than_one_join("submitted_applications"):
+ if contact is not None and not contact.has_more_than_one_join("submitted_domain_requests"):
# if contact exists in the database and is not joined to other entities
super().to_database(contact)
else:
@@ -579,9 +579,9 @@ class OtherContactsYesNoForm(RegistrarForm):
"""Extend the initialization of the form from RegistrarForm __init__"""
super().__init__(*args, **kwargs)
# set the initial value based on attributes of application
- if self.application and self.application.has_other_contacts():
+ if self.domain_request and self.domain_request.has_other_contacts():
initial_value = True
- elif self.application and self.application.has_rationale():
+ elif self.domain_request and self.domain_request.has_rationale():
initial_value = False
else:
# No pre-selection for new applications
@@ -687,7 +687,7 @@ class BaseOtherContactsFormSet(RegistrarFormSet):
this case, all forms in formset are marked for deletion. Both of these conditions
must co-exist.
Also, other_contacts have db relationships to multiple db objects. When attempting
- to delete an other_contact from an application, those db relationships must be
+ to delete an other_contact from a domain request, those db relationships must be
tested and handled.
"""
@@ -701,7 +701,7 @@ class BaseOtherContactsFormSet(RegistrarFormSet):
Override __init__ for RegistrarFormSet.
"""
self.formset_data_marked_for_deletion = False
- self.application = kwargs.pop("application", None)
+ self.domain_request = kwargs.pop("domain_request", None)
super(RegistrarFormSet, self).__init__(*args, **kwargs)
# quick workaround to ensure that the HTML `required`
# attribute shows up on required fields for the first form
diff --git a/src/registrar/management/commands/load.py b/src/registrar/management/commands/load.py
index 369e9d5ba..aac5eade1 100644
--- a/src/registrar/management/commands/load.py
+++ b/src/registrar/management/commands/load.py
@@ -5,7 +5,7 @@ from auditlog.context import disable_auditlog # type: ignore
from registrar.fixtures_users import UserFixture
-from registrar.fixtures_applications import DomainRequestFixture, DomainFixture
+from registrar.fixtures_domain_requests import DomainRequestFixture, DomainFixture
logger = logging.getLogger(__name__)
diff --git a/src/registrar/models/domain_information.py b/src/registrar/models/domain_information.py
index 3d8f76a5d..f757c7d61 100644
--- a/src/registrar/models/domain_information.py
+++ b/src/registrar/models/domain_information.py
@@ -18,7 +18,7 @@ class DomainInformation(TimeStampedModel):
DomainRequest. We use these field from DomainRequest with few exceptions
which are 'removed' via pop at the bottom of this file. Most of design for domain
management's user information are based on application, but we cannot change
- the application once approved, so copying them that way we can make changes
+ the domain request once approved, so copying them that way we can make changes
after its approved. Most fields here are copied from Application."""
StateTerritoryChoices = DomainRequest.StateTerritoryChoices
@@ -30,7 +30,7 @@ class DomainInformation(TimeStampedModel):
AGENCY_CHOICES = DomainRequest.AGENCY_CHOICES
- # This is the application user who created this application. The contact
+ # This is the domain request user who created this domain request. The contact
# information that they gave is in the `submitter` field
creator = models.ForeignKey(
"registrar.User",
@@ -169,7 +169,7 @@ class DomainInformation(TimeStampedModel):
"registrar.Contact",
null=True,
blank=True,
- related_name="submitted_applications_information",
+ related_name="submitted_domain_requests_information",
on_delete=models.PROTECT,
)
@@ -182,7 +182,7 @@ class DomainInformation(TimeStampedModel):
other_contacts = models.ManyToManyField(
"registrar.Contact",
blank=True,
- related_name="contact_applications_information",
+ related_name="contact_domain_requests_information",
verbose_name="contacts",
)
diff --git a/src/registrar/models/domain_application.py b/src/registrar/models/domain_request.py
similarity index 90%
rename from src/registrar/models/domain_application.py
rename to src/registrar/models/domain_request.py
index 5a1865b3a..4e141107f 100644
--- a/src/registrar/models/domain_application.py
+++ b/src/registrar/models/domain_request.py
@@ -21,7 +21,7 @@ class DomainRequest(TimeStampedModel):
"""A registrant's application for a new domain."""
# Constants for choice fields
- class ApplicationStatus(models.TextChoices):
+ class DomainRequestStatus(models.TextChoices):
STARTED = "started", "Started"
SUBMITTED = "submitted", "Submitted"
IN_REVIEW = "in review", "In review"
@@ -115,7 +115,7 @@ class DomainRequest(TimeStampedModel):
class OrganizationChoicesVerbose(models.TextChoices):
"""
Secondary organization choices
- For use in the application form and on the templates
+ For use in the domain request form and on the templates
Keys need to match OrganizationChoices
"""
@@ -366,10 +366,10 @@ class DomainRequest(TimeStampedModel):
NAMING_REQUIREMENTS = "naming_not_met", "Naming requirements not met"
OTHER = "other", "Other/Unspecified"
- # #### Internal fields about the application #####
+ # #### Internal fields about the domain request #####
status = FSMField(
- choices=ApplicationStatus.choices, # possible states as an array of constants
- default=ApplicationStatus.STARTED, # sensible default
+ choices=DomainRequestStatus.choices, # possible states as an array of constants
+ default=DomainRequestStatus.STARTED, # sensible default
protected=False, # can change state directly, particularly in Django admin
)
@@ -379,7 +379,7 @@ class DomainRequest(TimeStampedModel):
blank=True,
)
- # This is the application user who created this application. The contact
+ # This is the domain request user who created this domain request. The contact
# information that they gave is in the `submitter` field
creator = models.ForeignKey(
"registrar.User",
@@ -536,7 +536,7 @@ class DomainRequest(TimeStampedModel):
"registrar.Contact",
null=True,
blank=True,
- related_name="submitted_applications",
+ related_name="submitted_domain_requests",
on_delete=models.PROTECT,
)
@@ -549,7 +549,7 @@ class DomainRequest(TimeStampedModel):
other_contacts = models.ManyToManyField(
"registrar.Contact",
blank=True,
- related_name="contact_applications",
+ related_name="contact_domain_requests",
verbose_name="contacts",
)
@@ -638,7 +638,7 @@ class DomainRequest(TimeStampedModel):
email_template,
email_template_subject,
self.submitter.email,
- context={"application": self},
+ context={"domain_request": self},
bcc_address=bcc_address,
)
logger.info(f"The {new_status} email sent to: {self.submitter.email}")
@@ -648,15 +648,15 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
source=[
- ApplicationStatus.STARTED,
- ApplicationStatus.IN_REVIEW,
- ApplicationStatus.ACTION_NEEDED,
- ApplicationStatus.WITHDRAWN,
+ DomainRequestStatus.STARTED,
+ DomainRequestStatus.IN_REVIEW,
+ DomainRequestStatus.ACTION_NEEDED,
+ DomainRequestStatus.WITHDRAWN,
],
- target=ApplicationStatus.SUBMITTED,
+ target=DomainRequestStatus.SUBMITTED,
)
def submit(self):
- """Submit an application that is started.
+ """Submit a domain request that is started.
As a side effect, an email notification is sent."""
@@ -679,7 +679,7 @@ class DomainRequest(TimeStampedModel):
self.save()
# Limit email notifications to transitions from Started and Withdrawn
- limited_statuses = [self.ApplicationStatus.STARTED, self.ApplicationStatus.WITHDRAWN]
+ limited_statuses = [self.DomainRequestStatus.STARTED, self.DomainRequestStatus.WITHDRAWN]
bcc_address = ""
if settings.IS_PRODUCTION:
@@ -697,17 +697,17 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
source=[
- ApplicationStatus.SUBMITTED,
- ApplicationStatus.ACTION_NEEDED,
- ApplicationStatus.APPROVED,
- ApplicationStatus.REJECTED,
- ApplicationStatus.INELIGIBLE,
+ DomainRequestStatus.SUBMITTED,
+ DomainRequestStatus.ACTION_NEEDED,
+ DomainRequestStatus.APPROVED,
+ DomainRequestStatus.REJECTED,
+ DomainRequestStatus.INELIGIBLE,
],
- target=ApplicationStatus.IN_REVIEW,
+ target=DomainRequestStatus.IN_REVIEW,
conditions=[domain_is_not_active],
)
def in_review(self):
- """Investigate an application that has been submitted.
+ """Investigate a domain request that has been submitted.
This action is logged.
@@ -716,13 +716,13 @@ class DomainRequest(TimeStampedModel):
As side effects this will delete the domain and domain_information
(will cascade) when they exist."""
- if self.status == self.ApplicationStatus.APPROVED:
+ if self.status == self.DomainRequestStatus.APPROVED:
self.delete_and_clean_up_domain("in_review")
- if self.status == self.ApplicationStatus.REJECTED:
+ if self.status == self.DomainRequestStatus.REJECTED:
self.rejection_reason = None
- literal = DomainRequest.ApplicationStatus.IN_REVIEW
+ literal = DomainRequest.DomainRequestStatus.IN_REVIEW
# Check if the tuple exists, then grab its value
in_review = literal if literal is not None else "In Review"
logger.info(f"A status change occurred. {self} was changed to '{in_review}'")
@@ -730,16 +730,16 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
source=[
- ApplicationStatus.IN_REVIEW,
- ApplicationStatus.APPROVED,
- ApplicationStatus.REJECTED,
- ApplicationStatus.INELIGIBLE,
+ DomainRequestStatus.IN_REVIEW,
+ DomainRequestStatus.APPROVED,
+ DomainRequestStatus.REJECTED,
+ DomainRequestStatus.INELIGIBLE,
],
- target=ApplicationStatus.ACTION_NEEDED,
+ target=DomainRequestStatus.ACTION_NEEDED,
conditions=[domain_is_not_active],
)
def action_needed(self):
- """Send back an application that is under investigation or rejected.
+ """Send back a domain request that is under investigation or rejected.
This action is logged.
@@ -748,13 +748,13 @@ class DomainRequest(TimeStampedModel):
As side effects this will delete the domain and domain_information
(will cascade) when they exist."""
- if self.status == self.ApplicationStatus.APPROVED:
+ if self.status == self.DomainRequestStatus.APPROVED:
self.delete_and_clean_up_domain("reject_with_prejudice")
- if self.status == self.ApplicationStatus.REJECTED:
+ if self.status == self.DomainRequestStatus.REJECTED:
self.rejection_reason = None
- literal = DomainRequest.ApplicationStatus.ACTION_NEEDED
+ literal = DomainRequest.DomainRequestStatus.ACTION_NEEDED
# Check if the tuple is setup correctly, then grab its value
action_needed = literal if literal is not None else "Action Needed"
logger.info(f"A status change occurred. {self} was changed to '{action_needed}'")
@@ -762,15 +762,15 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
source=[
- ApplicationStatus.SUBMITTED,
- ApplicationStatus.IN_REVIEW,
- ApplicationStatus.ACTION_NEEDED,
- ApplicationStatus.REJECTED,
+ DomainRequestStatus.SUBMITTED,
+ DomainRequestStatus.IN_REVIEW,
+ DomainRequestStatus.ACTION_NEEDED,
+ DomainRequestStatus.REJECTED,
],
- target=ApplicationStatus.APPROVED,
+ target=DomainRequestStatus.APPROVED,
)
def approve(self, send_email=True):
- """Approve an application that has been submitted.
+ """Approve a domain request that has been submitted.
This action cleans up the rejection status if moving away from rejected.
@@ -796,7 +796,7 @@ class DomainRequest(TimeStampedModel):
user=self.creator, domain=created_domain, role=UserDomainRole.Roles.MANAGER
)
- if self.status == self.ApplicationStatus.REJECTED:
+ if self.status == self.DomainRequestStatus.REJECTED:
self.rejection_reason = None
self._send_status_update_email(
@@ -808,11 +808,11 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
- source=[ApplicationStatus.SUBMITTED, ApplicationStatus.IN_REVIEW, ApplicationStatus.ACTION_NEEDED],
- target=ApplicationStatus.WITHDRAWN,
+ source=[DomainRequestStatus.SUBMITTED, DomainRequestStatus.IN_REVIEW, DomainRequestStatus.ACTION_NEEDED],
+ target=DomainRequestStatus.WITHDRAWN,
)
def withdraw(self):
- """Withdraw an application that has been submitted."""
+ """Withdraw a domain request that has been submitted."""
self._send_status_update_email(
"withdraw",
@@ -822,17 +822,17 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
- source=[ApplicationStatus.IN_REVIEW, ApplicationStatus.ACTION_NEEDED, ApplicationStatus.APPROVED],
- target=ApplicationStatus.REJECTED,
+ source=[DomainRequestStatus.IN_REVIEW, DomainRequestStatus.ACTION_NEEDED, DomainRequestStatus.APPROVED],
+ target=DomainRequestStatus.REJECTED,
conditions=[domain_is_not_active],
)
def reject(self):
- """Reject an application that has been submitted.
+ """Reject a domain request that has been submitted.
As side effects this will delete the domain and domain_information
(will cascade), and send an email notification."""
- if self.status == self.ApplicationStatus.APPROVED:
+ if self.status == self.DomainRequestStatus.APPROVED:
self.delete_and_clean_up_domain("reject")
self._send_status_update_email(
@@ -844,12 +844,12 @@ class DomainRequest(TimeStampedModel):
@transition(
field="status",
source=[
- ApplicationStatus.IN_REVIEW,
- ApplicationStatus.ACTION_NEEDED,
- ApplicationStatus.APPROVED,
- ApplicationStatus.REJECTED,
+ DomainRequestStatus.IN_REVIEW,
+ DomainRequestStatus.ACTION_NEEDED,
+ DomainRequestStatus.APPROVED,
+ DomainRequestStatus.REJECTED,
],
- target=ApplicationStatus.INELIGIBLE,
+ target=DomainRequestStatus.INELIGIBLE,
conditions=[domain_is_not_active],
)
def reject_with_prejudice(self):
@@ -861,7 +861,7 @@ class DomainRequest(TimeStampedModel):
permissions classes test against. This will also delete the domain
and domain_information (will cascade) when they exist."""
- if self.status == self.ApplicationStatus.APPROVED:
+ if self.status == self.DomainRequestStatus.APPROVED:
self.delete_and_clean_up_domain("reject_with_prejudice")
self.creator.restrict_user()
@@ -869,7 +869,7 @@ class DomainRequest(TimeStampedModel):
# ## Form policies ###
#
# These methods control what questions need to be answered by applicants
- # during the application flow. They are policies about the application so
+ # during the domain request flow. They are policies about the domain request so
# they appear here.
def show_organization_federal(self) -> bool:
@@ -905,15 +905,15 @@ class DomainRequest(TimeStampedModel):
]
def has_rationale(self) -> bool:
- """Does this application have no_other_contacts_rationale?"""
+ """Does this domain request have no_other_contacts_rationale?"""
return bool(self.no_other_contacts_rationale)
def has_other_contacts(self) -> bool:
- """Does this application have other contacts listed?"""
+ """Does this domain request have other contacts listed?"""
return self.other_contacts.exists()
def is_federal(self) -> Union[bool, None]:
- """Is this application for a federal agency?
+ """Is this domain request for a federal agency?
organization_type can be both null and blank,
"""
diff --git a/src/registrar/templates/application_about_your_organization.html b/src/registrar/templates/domain_request_about_your_organization.html
similarity index 95%
rename from src/registrar/templates/application_about_your_organization.html
rename to src/registrar/templates/domain_request_about_your_organization.html
index 02e2e2c4f..9be8626aa 100644
--- a/src/registrar/templates/application_about_your_organization.html
+++ b/src/registrar/templates/domain_request_about_your_organization.html
@@ -1,4 +1,4 @@
-{% extends 'application_form.html' %}
+{% extends 'domain_request_form.html' %}
{% load field_helpers %}
{% block form_instructions %}
diff --git a/src/registrar/templates/application_anything_else.html b/src/registrar/templates/domain_request_anything_else.html
similarity index 92%
rename from src/registrar/templates/application_anything_else.html
rename to src/registrar/templates/domain_request_anything_else.html
index c1ecf94a9..326f9a5cf 100644
--- a/src/registrar/templates/application_anything_else.html
+++ b/src/registrar/templates/domain_request_anything_else.html
@@ -1,4 +1,4 @@
-{% extends 'application_form.html' %}
+{% extends 'domain_request_form.html' %}
{% load field_helpers %}
{% block form_instructions %}
diff --git a/src/registrar/templates/application_authorizing_official.html b/src/registrar/templates/domain_request_authorizing_official.html
similarity index 96%
rename from src/registrar/templates/application_authorizing_official.html
rename to src/registrar/templates/domain_request_authorizing_official.html
index 068457373..df4931ba7 100644
--- a/src/registrar/templates/application_authorizing_official.html
+++ b/src/registrar/templates/domain_request_authorizing_official.html
@@ -1,4 +1,4 @@
-{% extends 'application_form.html' %}
+{% extends 'domain_request_form.html' %}
{% load field_helpers url_helpers %}
{% block form_instructions %}
diff --git a/src/registrar/templates/application_current_sites.html b/src/registrar/templates/domain_request_current_sites.html
similarity index 96%
rename from src/registrar/templates/application_current_sites.html
rename to src/registrar/templates/domain_request_current_sites.html
index debadcfe2..2a2ac6885 100644
--- a/src/registrar/templates/application_current_sites.html
+++ b/src/registrar/templates/domain_request_current_sites.html
@@ -1,4 +1,4 @@
-{% extends 'application_form.html' %}
+{% extends 'domain_request_form.html' %}
{% load static field_helpers %}
{% block form_instructions %}
diff --git a/src/registrar/templates/application_done.html b/src/registrar/templates/domain_request_done.html
similarity index 100%
rename from src/registrar/templates/application_done.html
rename to src/registrar/templates/domain_request_done.html
diff --git a/src/registrar/templates/application_dotgov_domain.html b/src/registrar/templates/domain_request_dotgov_domain.html
similarity index 98%
rename from src/registrar/templates/application_dotgov_domain.html
rename to src/registrar/templates/domain_request_dotgov_domain.html
index 155fdbeb4..60220e014 100644
--- a/src/registrar/templates/application_dotgov_domain.html
+++ b/src/registrar/templates/domain_request_dotgov_domain.html
@@ -1,4 +1,4 @@
-{% extends 'application_form.html' %}
+{% extends 'domain_request_form.html' %}
{% load static field_helpers url_helpers %}
{% block form_instructions %}
diff --git a/src/registrar/templates/application_form.html b/src/registrar/templates/domain_request_form.html
similarity index 96%
rename from src/registrar/templates/application_form.html
rename to src/registrar/templates/domain_request_form.html
index 965967072..db436aeb3 100644
--- a/src/registrar/templates/application_form.html
+++ b/src/registrar/templates/domain_request_form.html
@@ -6,12 +6,12 @@
- {% include 'application_sidebar.html' %}
+ {% include 'domain_request_sidebar.html' %}
",
)
diff --git a/src/registrar/tests/test_models.py b/src/registrar/tests/test_models.py
index baa5ef3b5..9b12dbf98 100644
--- a/src/registrar/tests/test_models.py
+++ b/src/registrar/tests/test_models.py
@@ -185,7 +185,7 @@ class TestDomainRequest(TestCase):
self.check_email_sent(domain_request, msg, "submit", 1)
def test_submit_from_withdrawn_sends_email(self):
- msg = "Create a withdrawn application and submit it and see if email was sent."
+ msg = "Create a withdrawn domain request and submit it and see if email was sent."
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.WITHDRAWN)
self.check_email_sent(domain_request, msg, "submit", 1)
@@ -195,7 +195,7 @@ class TestDomainRequest(TestCase):
self.check_email_sent(domain_request, msg, "submit", 0)
def test_submit_from_in_review_does_not_send_email(self):
- msg = "Create a withdrawn application and submit it and see if email was sent."
+ msg = "Create a withdrawn domain request and submit it and see if email was sent."
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.IN_REVIEW)
self.check_email_sent(domain_request, msg, "submit", 0)
@@ -579,7 +579,7 @@ class TestDomainRequest(TestCase):
the rejection_reason is cleared."""
with less_console_noise():
- # Create a sample application
+ # Create a sample domain request
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.REJECTED)
domain_request.rejection_reason = DomainRequest.RejectionReasons.DOMAIN_PURPOSE
@@ -595,7 +595,7 @@ class TestDomainRequest(TestCase):
the rejection_reason is cleared."""
with less_console_noise():
- # Create a sample application
+ # Create a sample domain request
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.REJECTED)
domain_request.domain_is_not_active = True
domain_request.rejection_reason = DomainRequest.RejectionReasons.DOMAIN_PURPOSE
@@ -612,7 +612,7 @@ class TestDomainRequest(TestCase):
the rejection_reason is cleared."""
with less_console_noise():
- # Create a sample application
+ # Create a sample domain request
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.REJECTED)
domain_request.domain_is_not_active = True
domain_request.rejection_reason = DomainRequest.RejectionReasons.DOMAIN_PURPOSE
@@ -719,7 +719,7 @@ class TestDomainInformation(TestCase):
creator=user,
domain=domain,
notes="test notes",
- domain_request=application,
+ domain_request=domain_request,
).__dict__
# Test the two records for consistency
diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py
index b4ec1288a..eec12e463 100644
--- a/src/registrar/tests/test_views.py
+++ b/src/registrar/tests/test_views.py
@@ -45,7 +45,7 @@ class TestWithUser(MockEppLib):
)
def tearDown(self):
- # delete any applications too
+ # delete any domain requests too
super().tearDown()
DomainRequest.objects.all().delete()
DomainInformation.objects.all().delete()
diff --git a/src/registrar/tests/test_views_application.py b/src/registrar/tests/test_views_application.py
index ca75a3774..1414d4525 100644
--- a/src/registrar/tests/test_views_application.py
+++ b/src/registrar/tests/test_views_application.py
@@ -43,7 +43,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_form_intro_acknowledgement(self):
"""Tests that user is presented with intro acknowledgement page"""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
self.assertContains(intro_page, "You’re about to start your .gov domain request")
def test_domain_request_form_intro_is_skipped_when_edit_access(self):
@@ -61,7 +61,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_form_empty_submit(self):
"""Tests empty submit on the first page after the acknowledgement page"""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -82,7 +82,7 @@ class DomainRequestTests(TestWithUser, WebTest):
self.assertIn("What kind of U.S.-based government organization do you represent?", result)
def test_domain_request_multiple_domain_requests_exist(self):
- """Test that an info message appears when user has multiple applications already"""
+ """Test that an info message appears when user has multiple domain requests already"""
# create and submit a domain request
domain_request = completed_domain_request(user=self.user)
mock_client = MockSESClient()
@@ -93,7 +93,7 @@ class DomainRequestTests(TestWithUser, WebTest):
# now, attempt to create another one
with less_console_noise():
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
intro_form = intro_page.forms[0]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
@@ -123,7 +123,7 @@ class DomainRequestTests(TestWithUser, WebTest):
SKIPPED_PAGES = 3
num_pages = len(self.TITLES) - SKIPPED_PAGES
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -481,13 +481,13 @@ class DomainRequestTests(TestWithUser, WebTest):
self.assertContains(home_page, "Started")
num_pages_tested += 1
- # TODO: For some reason this click results in a new application being generated
+ # TODO: For some reason this click results in a new domain request being generated
# This appraoch is an alternatie to using get as is being done below
#
# type_page = home_page.click("Edit")
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
- url = reverse("edit-application", kwargs={"id": domain_request.pk})
+ url = reverse("edit-domain-request", kwargs={"id": domain_request.pk})
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# TODO: The following line results in a django error on middleware
@@ -500,7 +500,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_form_conditional_federal(self):
"""Federal branch question is shown for federal organizations."""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -555,7 +555,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_form_conditional_elections(self):
"""Election question is shown for other organizations."""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -609,7 +609,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_form_section_skipping(self):
"""Can skip forward and back in sections"""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -646,7 +646,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_form_nonfederal(self):
"""Non-federal organizations don't have to provide their federal agency."""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -691,7 +691,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_about_your_organization_special(self):
"""Special districts have to answer an additional question."""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -719,18 +719,18 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_yes_no_form_inits_blank_for_new_domain_request(self):
"""On the Other Contacts page, the yes/no form gets initialized with nothing selected for
- new applications"""
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ new domain requests"""
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
other_contacts_form = other_contacts_page.forms[0]
self.assertEquals(other_contacts_form["other_contacts-has_other_contacts"].value, None)
def test_yes_no_form_inits_yes_for_domain_request_with_other_contacts(self):
"""On the Other Contacts page, the yes/no form gets initialized with YES selected if the
- application has other contacts"""
- # Application has other contacts by default
+ domain request has other contacts"""
+ # Domain Request has other contacts by default
domain_request = completed_domain_request(user=self.user)
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -738,7 +738,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -746,13 +746,13 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_yes_no_form_inits_no_for_domain_request_with_no_other_contacts_rationale(self):
"""On the Other Contacts page, the yes/no form gets initialized with NO selected if the
- application has no other contacts"""
- # Application has other contacts by default
+ domain request has no other contacts"""
+ # Domain request has other contacts by default
domain_request = completed_domain_request(user=self.user, has_other_contacts=False)
domain_request.no_other_contacts_rationale = "Hello!"
domain_request.save()
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -760,7 +760,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -769,12 +769,12 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_submitting_other_contacts_deletes_no_other_contacts_rationale(self):
"""When a user submits the Other Contacts form with other contacts selected, the domain request's
no other contacts rationale gets deleted"""
- # Application has other contacts by default
+ # Domain request has other contacts by default
domain_request = completed_domain_request(user=self.user, has_other_contacts=False)
domain_request.no_other_contacts_rationale = "Hello!"
domain_request.save()
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -782,7 +782,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -818,10 +818,10 @@ class DomainRequestTests(TestWithUser, WebTest):
"""When a user submits the Other Contacts form with no other contacts selected, the domain request's
other contacts get deleted for other contacts that exist and are not joined to other objects
"""
- # Application has other contacts by default
+ # Domain request has other contacts by default
domain_request = completed_domain_request(user=self.user)
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -829,7 +829,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -905,7 +905,7 @@ class DomainRequestTests(TestWithUser, WebTest):
domain_info.other_contacts.set([other])
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -913,7 +913,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -953,7 +953,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_if_yes_no_form_is_no_then_no_other_contacts_required(self):
"""Applicants with no other contacts have to give a reason."""
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
other_contacts_form = other_contacts_page.forms[0]
other_contacts_form["other_contacts-has_other_contacts"] = "False"
response = other_contacts_page.forms[0].submit()
@@ -968,7 +968,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_if_yes_no_form_is_yes_then_other_contacts_required(self):
"""Applicants with other contacts do not have to give a reason."""
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
other_contacts_form = other_contacts_page.forms[0]
other_contacts_form["other_contacts-has_other_contacts"] = "True"
response = other_contacts_page.forms[0].submit()
@@ -1036,7 +1036,7 @@ class DomainRequestTests(TestWithUser, WebTest):
domain_request.other_contacts.add(other2)
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1044,7 +1044,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -1109,7 +1109,7 @@ class DomainRequestTests(TestWithUser, WebTest):
domain_request.other_contacts.add(other)
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1117,7 +1117,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -1186,7 +1186,7 @@ class DomainRequestTests(TestWithUser, WebTest):
domain_request.other_contacts.add(other)
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1194,7 +1194,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -1266,7 +1266,7 @@ class DomainRequestTests(TestWithUser, WebTest):
other_contact_pk = other.id
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1274,7 +1274,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -1342,7 +1342,7 @@ class DomainRequestTests(TestWithUser, WebTest):
other_contact_pk = ao.id
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1350,7 +1350,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- other_contacts_page = self.app.get(reverse("application:other_contacts"))
+ other_contacts_page = self.app.get(reverse("domain-request:other_contacts"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
other_contacts_form = other_contacts_page.forms[0]
@@ -1411,7 +1411,7 @@ class DomainRequestTests(TestWithUser, WebTest):
ao_pk = ao.id
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1419,7 +1419,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- ao_page = self.app.get(reverse("application:authorizing_official"))
+ ao_page = self.app.get(reverse("domain-request:authorizing_official"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
ao_form = ao_page.forms[0]
@@ -1479,7 +1479,7 @@ class DomainRequestTests(TestWithUser, WebTest):
ao_pk = ao.id
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1487,7 +1487,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- ao_page = self.app.get(reverse("application:authorizing_official"))
+ ao_page = self.app.get(reverse("domain-request:authorizing_official"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
ao_form = ao_page.forms[0]
@@ -1548,7 +1548,7 @@ class DomainRequestTests(TestWithUser, WebTest):
submitter_pk = you.id
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1556,7 +1556,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- your_contact_page = self.app.get(reverse("application:your_contact"))
+ your_contact_page = self.app.get(reverse("domain-request:your_contact"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
your_contact_form = your_contact_page.forms[0]
@@ -1615,7 +1615,7 @@ class DomainRequestTests(TestWithUser, WebTest):
submitter_pk = submitter.id
# prime the form by visiting /edit
- self.app.get(reverse("edit-application", kwargs={"id": domain_request.pk}))
+ self.app.get(reverse("edit-domain-request", kwargs={"id": domain_request.pk}))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1623,7 +1623,7 @@ class DomainRequestTests(TestWithUser, WebTest):
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
- your_contact_page = self.app.get(reverse("application:your_contact"))
+ your_contact_page = self.app.get(reverse("domain-request:your_contact"))
self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
your_contact_form = your_contact_page.forms[0]
@@ -1650,7 +1650,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_about_your_organiztion_interstate(self):
"""Special districts have to answer an additional question."""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1678,7 +1678,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_tribal_government(self):
"""Tribal organizations have to answer an additional question."""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1708,7 +1708,7 @@ class DomainRequestTests(TestWithUser, WebTest):
self.assertContains(tribal_government_page, self.TITLES[Step.TRIBAL_GOVERNMENT])
def test_domain_request_ao_dynamic_text(self):
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1779,7 +1779,7 @@ class DomainRequestTests(TestWithUser, WebTest):
self.assertContains(ao_page, "Domain requests from cities")
def test_domain_request_dotgov_domain_dynamic_text(self):
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -1881,7 +1881,7 @@ class DomainRequestTests(TestWithUser, WebTest):
def test_domain_request_formsets(self):
"""Users are able to add more than one of some fields."""
- current_sites_page = self.app.get(reverse("application:current_sites"))
+ current_sites_page = self.app.get(reverse("domain-request:current_sites"))
session_id = self.app.cookies[settings.SESSION_COOKIE_NAME]
# fill in the form field
current_sites_form = current_sites_page.forms[0]
@@ -1909,7 +1909,7 @@ class DomainRequestTests(TestWithUser, WebTest):
@skip("WIP")
def test_domain_request_edit_restore(self):
"""
- Test that a previously saved application is available at the /edit endpoint.
+ Test that a previously saved domain request is available at the /edit endpoint.
"""
ao, _ = Contact.objects.get_or_create(
first_name="Testy",
@@ -1955,7 +1955,7 @@ class DomainRequestTests(TestWithUser, WebTest):
domain_request.alternative_domains.add(alt)
# prime the form by visiting /edit
- url = reverse("edit-application", kwargs={"id": domain_request.pk})
+ url = reverse("edit-domain-request", kwargs={"id": domain_request.pk})
response = self.client.get(url)
# TODO: this is a sketch of each page in the wizard which needs to be tested
@@ -1965,7 +1965,7 @@ class DomainRequestTests(TestWithUser, WebTest):
# -- the best that can/should be done here is to ensure the correct values
# are being passed to the templating engine
- url = reverse("application:organization_type")
+ url = reverse("domain-request:organization_type")
response = self.client.get(url, follow=True)
self.assertContains(response, "")
# choices = response.context['wizard']['form']['organization_type'].subwidgets
@@ -1973,62 +1973,62 @@ class DomainRequestTests(TestWithUser, WebTest):
# checked = radio.data["selected"]
# self.assertTrue(checked)
- # url = reverse("application:organization_federal")
+ # url = reverse("domain-request:organization_federal")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:organization_contact")
+ # url = reverse("domain-request:organization_contact")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:authorizing_official")
+ # url = reverse("domain-request:authorizing_official")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:current_sites")
+ # url = reverse("domain-request:current_sites")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:dotgov_domain")
+ # url = reverse("domain-request:dotgov_domain")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:purpose")
+ # url = reverse("domain-request:purpose")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:your_contact")
+ # url = reverse("domain-request:your_contact")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:other_contacts")
+ # url = reverse("domain-request:other_contacts")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:other_contacts")
+ # url = reverse("domain-request:other_contacts")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:security_email")
+ # url = reverse("domain-request:security_email")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:anything_else")
+ # url = reverse("domain-request:anything_else")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
- # url = reverse("application:requirements")
+ # url = reverse("domain-request:requirements")
# self.app.set_cookie(settings.SESSION_COOKIE_NAME, session_id)
# page = self.app.get(url)
# self.assertNotContains(page, "VALUE")
@@ -2038,7 +2038,7 @@ class DomainRequestTests(TestWithUser, WebTest):
Make sure the long name is displaying in the domain request form,
org step
"""
- intro_page = self.app.get(reverse("application:"))
+ intro_page = self.app.get(reverse("domain-request:"))
# django-webtest does not handle cookie-based sessions well because it keeps
# resetting the session key on each new request, thus destroying the concept
# of a "session". We are going to do it manually, saving the session ID here
@@ -2063,7 +2063,7 @@ class DomainRequestTests(TestWithUser, WebTest):
NOTE: This may be a moot point if we implement a more solid pattern in the
future, like not a submit action at all on the review page."""
- review_page = self.app.get(reverse("application:review"))
+ review_page = self.app.get(reverse("domain-request:review"))
self.assertContains(review_page, "toggle-submit-domain-request")
self.assertContains(review_page, "You are about to submit an incomplete request")
@@ -2075,7 +2075,7 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
self.client.force_login(self.user)
def test_domain_request_status(self):
- """Checking application status page"""
+ """Checking domain request status page"""
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.SUBMITTED, user=self.user)
domain_request.save()
@@ -2091,7 +2091,7 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
self.assertContains(detail_page, "Status:")
def test_domain_request_status_with_ineligible_user(self):
- """Checking application status page whith a blocked user.
+ """Checking domain request status page whith a blocked user.
The user should still have access to view."""
self.user.status = "ineligible"
self.user.save()
@@ -2110,7 +2110,7 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
self.assertContains(detail_page, "Status:")
def test_domain_request_withdraw(self):
- """Checking application status page"""
+ """Checking domain request status page"""
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.SUBMITTED, user=self.user)
domain_request.save()
@@ -2143,7 +2143,7 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
self.assertContains(home_page, "Withdrawn")
def test_domain_request_withdraw_no_permissions(self):
- """Can't withdraw applications as a restricted user."""
+ """Can't withdraw domain requests as a restricted user."""
self.user.status = User.RESTRICTED
self.user.save()
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.SUBMITTED, user=self.user)
@@ -2162,15 +2162,15 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
# Restricted user trying to withdraw results in 403 error
with less_console_noise():
for url_name in [
- "application-withdraw-confirmation",
- "application-withdrawn",
+ "domain-request-withdraw-confirmation",
+ "domain-request-withdrawn",
]:
with self.subTest(url_name=url_name):
page = self.client.get(reverse(url_name, kwargs={"pk": domain_request.pk}))
self.assertEqual(page.status_code, 403)
def test_domain_request_status_no_permissions(self):
- """Can't access applications without being the creator."""
+ """Can't access domain requests without being the creator."""
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.SUBMITTED, user=self.user)
other_user = User()
other_user.save()
@@ -2180,23 +2180,23 @@ class DomainRequestTestDifferentStatuses(TestWithUser, WebTest):
# PermissionDeniedErrors make lots of noise in test output
with less_console_noise():
for url_name in [
- "application-status",
- "application-withdraw-confirmation",
- "application-withdrawn",
+ "domain-request-status",
+ "domain-request-withdraw-confirmation",
+ "domain-request-withdrawn",
]:
with self.subTest(url_name=url_name):
page = self.client.get(reverse(url_name, kwargs={"pk": domain_request.pk}))
self.assertEqual(page.status_code, 403)
def test_approved_domain_request_not_in_active_requests(self):
- """An approved application is not shown in the Active
+ """An approved domain request is not shown in the Active
Requests table on home.html."""
domain_request = completed_domain_request(status=DomainRequest.DomainRequestStatus.APPROVED, user=self.user)
domain_request.save()
home_page = self.app.get("/")
# This works in our test environment because creating
- # an approved application here does not generate a
+ # an approved domain request here does not generate a
# domain object, so we do not expect to see 'city.gov'
# in either the Domains or Requests tables.
self.assertNotContains(home_page, "city.gov")
@@ -2481,7 +2481,7 @@ class HomeTests(TestWithUser):
self.assertContains(home_page, "button-toggle-delete-domain-alert-1")
# Trigger the delete logic
- response = self.client.post(reverse("application-delete", kwargs={"pk": domain_request.pk}), follow=True)
+ response = self.client.post(reverse("domain-request-delete", kwargs={"pk": domain_request.pk}), follow=True)
self.assertNotContains(response, "igorville.gov")
@@ -2505,7 +2505,7 @@ class HomeTests(TestWithUser):
self.assertContains(home_page, "button-toggle-delete-domain-alert-1")
# Trigger the delete logic
- response = self.client.post(reverse("application-delete", kwargs={"pk": domain_request.pk}), follow=True)
+ response = self.client.post(reverse("domain-request-delete", kwargs={"pk": domain_request.pk}), follow=True)
self.assertNotContains(response, "igorville.gov")
@@ -2513,7 +2513,7 @@ class HomeTests(TestWithUser):
domain_request.delete()
def test_home_doesnt_delete_other_domain_requests(self):
- """Tests to ensure the user can't delete Applications not in the status of STARTED or WITHDRAWN"""
+ """Tests to ensure the user can't delete domain requests not in the status of STARTED or WITHDRAWN"""
# Given that we are including a subset of items that can be deleted while excluding the rest,
# subTest is appropriate here as otherwise we would need many duplicate tests for the same reason.
@@ -2531,7 +2531,7 @@ class HomeTests(TestWithUser):
# Trigger the delete logic
response = self.client.post(
- reverse("application-delete", kwargs={"pk": domain_request.pk}), follow=True
+ reverse("domain-request-delete", kwargs={"pk": domain_request.pk}), follow=True
)
# Check for a 403 error - the end user should not be allowed to do this
@@ -2577,7 +2577,7 @@ class HomeTests(TestWithUser):
)
domain_request.other_contacts.set([contact_2])
- # Create a second application to attach contacts to
+ # Create a second domain request to attach contacts to
site_2 = DraftDomain.objects.create(name="teaville.gov")
domain_request_2 = DomainRequest.objects.create(
creator=self.user,
@@ -2593,7 +2593,7 @@ class HomeTests(TestWithUser):
self.assertContains(home_page, "igorville.gov")
# Trigger the delete logic
- response = self.client.post(reverse("application-delete", kwargs={"pk": domain_request.pk}), follow=True)
+ response = self.client.post(reverse("domain-request-delete", kwargs={"pk": domain_request.pk}), follow=True)
# igorville is now deleted
self.assertNotContains(response, "igorville.gov")
@@ -2649,7 +2649,7 @@ class HomeTests(TestWithUser):
)
domain_request.other_contacts.set([contact_2])
- # Create a second application to attach contacts to
+ # Create a second domain request to attach contacts to
site_2 = DraftDomain.objects.create(name="teaville.gov")
domain_request_2 = DomainRequest.objects.create(
creator=self.user,
@@ -2664,7 +2664,7 @@ class HomeTests(TestWithUser):
self.assertContains(home_page, "teaville.gov")
# Trigger the delete logic
- response = self.client.post(reverse("application-delete", kwargs={"pk": domain_request_2.pk}), follow=True)
+ response = self.client.post(reverse("domain-request-delete", kwargs={"pk": domain_request_2.pk}), follow=True)
self.assertNotContains(response, "teaville.gov")
diff --git a/src/registrar/views/domain_request.py b/src/registrar/views/domain_request.py
index bdb125c0a..f7a784b51 100644
--- a/src/registrar/views/domain_request.py
+++ b/src/registrar/views/domain_request.py
@@ -74,8 +74,8 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
# NB: this is included here for reference. Do not change it without
# also changing the many places it is hardcoded in the HTML templates
URL_NAMESPACE = "domain_request"
- # name for accessing /application//edit
- EDIT_URL_NAME = "edit-application"
+ # name for accessing /domain-request//edit
+ EDIT_URL_NAME = "edit-domain-request"
NEW_URL_NAME = "/request/"
# We need to pass our human-readable step titles as context to the templates.
TITLES = {
@@ -118,7 +118,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
def prefix(self):
"""Namespace the wizard to avoid clashes in session variable names."""
# this is a string literal but can be made dynamic if we'd like
- # users to have multiple applications open for editing simultaneously
+ # users to have multiple domain requests open for editing simultaneously
return "wizard_domain_request"
@property
@@ -148,7 +148,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
)
return self._domain_request
except DomainRequest.DoesNotExist:
- logger.debug("Application id %s did not have a DomainRequest" % id)
+ logger.debug("DomainRequest id %s did not have a DomainRequest" % id)
self._domain_request = DomainRequest.objects.create(creator=self.request.user)
@@ -181,7 +181,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
"""Called when the user clicks the submit button, if all forms are valid."""
self.domain_request.submit() # change the status to submitted
self.domain_request.save()
- logger.debug("Application object saved: %s", self.domain_request.id)
+ logger.debug("Domain Request object saved: %s", self.domain_request.id)
return redirect(reverse(f"{self.URL_NAMESPACE}:finished"))
def from_model(self, attribute: str, default, *args, **kwargs):
@@ -210,7 +210,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
current_url = resolve(request.path_info).url_name
# if user visited via an "edit" url, associate the id of the
- # application they are trying to edit to this wizard instance
+ # domain request they are trying to edit to this wizard instance
# and remove any prior wizard data from their session
if current_url == self.EDIT_URL_NAME and "id" in kwargs:
del self.storage
@@ -309,7 +309,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
return self.pending_domain_requests()
def approved_domain_requests_exist(self):
- """Checks if user is creator of applications with DomainRequestStatus.APPROVED status"""
+ """Checks if user is creator of domain requests with DomainRequestStatus.APPROVED status"""
approved_domain_request_count = DomainRequest.objects.filter(
creator=self.request.user, status=DomainRequest.DomainRequestStatus.APPROVED
).count()
@@ -323,9 +323,9 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
return self.request.user.permissions.count() > 0
def pending_domain_requests(self):
- """Returns a List of user's applications with one of the following states:
+ """Returns a List of user's domain requests with one of the following states:
DomainRequestStatus.SUBMITTED, DomainRequestStatus.IN_REVIEW, DomainRequestStatus.ACTION_NEEDED"""
- # if the current application has DomainRequestStatus.ACTION_NEEDED status, this check should not be performed
+ # if the current domain request has DomainRequestStatus.ACTION_NEEDED status, this check should not be performed
if self.domain_request.status == DomainRequest.DomainRequestStatus.ACTION_NEEDED:
return []
check_statuses = [
@@ -639,7 +639,7 @@ class DomainRequestStatus(DomainRequestPermissionView):
template_name = "domain_request_status.html"
-class ApplicationWithdrawConfirmation(DomainRequestPermissionWithdrawView):
+class DomainRequestWithdrawConfirmation(DomainRequestPermissionWithdrawView):
"""This page will ask user to confirm if they want to withdraw
The DomainRequestPermissionView restricts access so that only the
@@ -649,7 +649,7 @@ class ApplicationWithdrawConfirmation(DomainRequestPermissionWithdrawView):
template_name = "domain_request_withdraw_confirmation.html"
-class ApplicationWithdrawn(DomainRequestPermissionWithdrawView):
+class DomainRequestWithdrawn(DomainRequestPermissionWithdrawView):
# this view renders no template
template_name = ""
@@ -689,8 +689,8 @@ class DomainRequestDeleteView(DomainRequestPermissionDeleteView):
def post(self, request, *args, **kwargs):
# Grab all orphaned contacts
- application: DomainRequest = self.get_object()
- contacts_to_delete, duplicates = self._get_orphaned_contacts(application)
+ domain_request: DomainRequest = self.get_object()
+ contacts_to_delete, duplicates = self._get_orphaned_contacts(domain_request)
# Delete the DomainRequest
response = super().post(request, *args, **kwargs)
@@ -716,7 +716,7 @@ class DomainRequestDeleteView(DomainRequestPermissionDeleteView):
and any other contacts linked to the domain_request.
Parameters:
- application (DomainRequest): The DomainRequest object for which to find orphaned contacts.
+ domain_request (DomainRequest): The DomainRequest object for which to find orphaned contacts.
check_db (bool, optional): A flag indicating whether to check the database for the existence of the contacts.
Defaults to False.
diff --git a/src/registrar/views/index.py b/src/registrar/views/index.py
index 1306b4cef..cb170078a 100644
--- a/src/registrar/views/index.py
+++ b/src/registrar/views/index.py
@@ -8,25 +8,25 @@ def index(request):
context = {}
if request.user.is_authenticated:
# Get all domain requests the user has access to
- applications, deletable_domain_requests = _get_domain_requests(request)
+ domain_requests, deletable_domain_requests = _get_domain_requests(request)
- context["domain_requests"] = applications
+ context["domain_requests"] = domain_requests
# Get all domains the user has access to
domains = _get_domains(request)
context["domains"] = domains
- # Determine if the user will see applications that they can delete
+ # Determine if the user will see domain requests that they can delete
has_deletable_domain_requests = deletable_domain_requests.exists()
context["has_deletable_domain_requests"] = has_deletable_domain_requests
- # If they can delete applications, add the delete button to the context
+ # If they can delete domain requests, add the delete button to the context
if has_deletable_domain_requests:
# Add the delete modal button to the context
modal_button = (
''
+ 'name="delete-domain-request">Yes, delete request'
)
context["modal_button"] = modal_button
@@ -37,20 +37,20 @@ def _get_domain_requests(request):
"""Given the current request,
get all DomainRequests that are associated with the UserDomainRole object.
- Returns a tuple of all applications, and those that are deletable by the user.
+ Returns a tuple of all domain requests, and those that are deletable by the user.
"""
- # Let's exclude the approved applications since our
+ # Let's exclude the approved domain requests since our
# domain_requests context will be used to populate
- # the active applications table
- applications = DomainRequest.objects.filter(creator=request.user).exclude(
+ # the active domain requests table
+ domain_requests = DomainRequest.objects.filter(creator=request.user).exclude(
status=DomainRequest.DomainRequestStatus.APPROVED
)
# Create a placeholder DraftDomain for each incomplete draft
valid_statuses = [DomainRequest.DomainRequestStatus.STARTED, DomainRequest.DomainRequestStatus.WITHDRAWN]
- deletable_domain_requests = applications.filter(status__in=valid_statuses)
+ deletable_domain_requests = domain_requests.filter(status__in=valid_statuses)
- return (applications, deletable_domain_requests)
+ return (domain_requests, deletable_domain_requests)
def _get_domains(request):
diff --git a/src/registrar/views/utility/mixins.py b/src/registrar/views/utility/mixins.py
index 400c6df53..aa0c9cd6b 100644
--- a/src/registrar/views/utility/mixins.py
+++ b/src/registrar/views/utility/mixins.py
@@ -244,9 +244,9 @@ class DomainPermission(PermissionsLoginMixin):
if DomainInformation.objects.filter(id=pk).exists():
requested_domain = DomainInformation.objects.get(id=pk)
- # if no domain information or application exist, the user
+ # if no domain information or domain request exist, the user
# should be able to manage the domain; however, if domain information
- # and domain request exist, and application is not in valid status,
+ # and domain request exist, and domain request is not in valid status,
# user should not be able to manage domain
if (
requested_domain
From 732766da0e503b390acbe5bee80f27020f8b4066 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 29 Feb 2024 20:35:02 -0700
Subject: [PATCH 06/29] linted and fixed urls
---
src/registrar/admin.py | 4 +---
src/registrar/config/urls.py | 4 ++--
src/registrar/views/domain_request.py | 3 ++-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index 28f17186a..c9eea460d 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -1081,9 +1081,7 @@ class DomainRequestAdmin(ListHeaderAdmin):
)
elif (
- obj
- and obj.status == models.DomainRequest.DomainRequestStatus.REJECTED
- and not obj.rejection_reason
+ obj and obj.status == models.DomainRequest.DomainRequestStatus.REJECTED and not obj.rejection_reason
):
# This condition should never be triggered.
# The opposite of this condition is acceptable (rejected -> other status and rejection_reason)
diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py
index 216a54c6a..9049d718c 100644
--- a/src/registrar/config/urls.py
+++ b/src/registrar/config/urls.py
@@ -66,12 +66,12 @@ urlpatterns = [
),
path(
"domain-request//withdraw",
- views.domain-requestWithdrawConfirmation.as_view(),
+ views.DomainRequestWithdrawConfirmation.as_view(),
name="domain-request-withdraw-confirmation",
),
path(
"domain-request//withdrawconfirmed",
- views.domain-requestWithdrawn.as_view(),
+ views.DomainRequestWithdrawn.as_view(),
name="domain-request-withdrawn",
),
path("health", views.health, name="health"),
diff --git a/src/registrar/views/domain_request.py b/src/registrar/views/domain_request.py
index f7a784b51..aff723ac3 100644
--- a/src/registrar/views/domain_request.py
+++ b/src/registrar/views/domain_request.py
@@ -362,7 +362,8 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
"purpose": self.domain_request.purpose is not None,
"your_contact": self.domain_request.submitter is not None,
"other_contacts": (
- self.domain_request.other_contacts.exists() or self.domain_request.no_other_contacts_rationale is not None
+ self.domain_request.other_contacts.exists()
+ or self.domain_request.no_other_contacts_rationale is not None
),
"anything_else": (
self.domain_request.anything_else is not None or self.domain_request.is_policy_acknowledged is not None
From a73f2ed03435e643653b8b37d6cf09a73bfd5ce2 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 29 Feb 2024 20:48:26 -0700
Subject: [PATCH 07/29] Restored old migrations
---
src/registrar/migrations/0001_initial.py | 2 +-
..._domain_host_nameserver_hostip_and_more.py | 4 ++--
...napplication_is_election_board_and_more.py | 22 +++++++++----------
.../0004_domainapplication_federal_agency.py | 4 ++--
.../0005_domainapplication_city_and_more.py | 8 +++----
.../migrations/0006_alter_contact_phone.py | 2 +-
..._more_organization_information_and_more.py | 22 +++++++++----------
..._remove_userprofile_created_at_and_more.py | 2 +-
...ion_federally_recognized_tribe_and_more.py | 6 ++---
...application_no_other_contacts_rationale.py | 4 ++--
...remove_domainapplication_security_email.py | 4 ++--
.../migrations/0012_delete_userprofile.py | 2 +-
...alter_domainapplication_status_and_more.py | 2 +-
.../migrations/0018_domaininformation.py | 10 ++++-----
...ter_domainapplication_organization_type.py | 2 +-
...remove_domaininformation_security_email.py | 2 +-
...ainapplication_approved_domain_and_more.py | 8 +++----
...t_name_alter_contact_last_name_and_more.py | 2 +-
...omainapplication_address_line2_and_more.py | 2 +-
...omaininformation_address_line1_and_more.py | 2 +-
.../0028_alter_domainapplication_status.py | 2 +-
...r_status_alter_domainapplication_status.py | 4 ++--
.../migrations/0030_alter_user_status.py | 2 +-
.../0031_transitiondomain_and_more.py | 10 ++++-----
...napplication_organization_type_and_more.py | 2 +-
.../migrations/0042_create_groups_v03.py | 2 +-
...inapplication_current_websites_and_more.py | 4 ++--
...0050_alter_contact_middle_name_and_more.py | 4 ++--
...domainapplication_urbanization_and_more.py | 2 +-
...omainapplication_anything_else_and_more.py | 4 ++--
.../migrations/0053_create_groups_v05.py | 2 +-
...mainapplication_federal_agency_and_more.py | 4 ++--
.../0055_transitiondomain_processed.py | 2 +-
...alter_domainapplication_status_and_more.py | 2 +-
.../0057_domainapplication_submission_date.py | 4 ++--
.../0058_alter_domaininformation_options.py | 2 +-
...omainapplication_address_line1_and_more.py | 4 ++--
.../migrations/0065_create_groups_v06.py | 2 +-
...plication_notes_domaininformation_notes.py | 2 +-
...email_alter_contact_first_name_and_more.py | 2 +-
...0070_domainapplication_rejection_reason.py | 2 +-
...t_name_alter_contact_last_name_and_more.py | 16 +++++++-------
42 files changed, 96 insertions(+), 96 deletions(-)
diff --git a/src/registrar/migrations/0001_initial.py b/src/registrar/migrations/0001_initial.py
index 70bcde188..8c50c750d 100644
--- a/src/registrar/migrations/0001_initial.py
+++ b/src/registrar/migrations/0001_initial.py
@@ -168,7 +168,7 @@ class Migration(migrations.Migration):
],
),
migrations.CreateModel(
- name="DomainRequest",
+ name="DomainApplication",
fields=[
(
"id",
diff --git a/src/registrar/migrations/0002_domain_host_nameserver_hostip_and_more.py b/src/registrar/migrations/0002_domain_host_nameserver_hostip_and_more.py
index d4a4a3918..f1049c252 100644
--- a/src/registrar/migrations/0002_domain_host_nameserver_hostip_and_more.py
+++ b/src/registrar/migrations/0002_domain_host_nameserver_hostip_and_more.py
@@ -142,14 +142,14 @@ class Migration(migrations.Migration):
},
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="requested_domain",
field=models.OneToOneField(
blank=True,
help_text="The requested domain",
null=True,
on_delete=django.db.models.deletion.PROTECT,
- related_name="domain_request",
+ related_name="domain_application",
to="registrar.domain",
),
),
diff --git a/src/registrar/migrations/0003_rename_is_election_office_domainapplication_is_election_board_and_more.py b/src/registrar/migrations/0003_rename_is_election_office_domainapplication_is_election_board_and_more.py
index 587747ea8..a6844bfaf 100644
--- a/src/registrar/migrations/0003_rename_is_election_office_domainapplication_is_election_board_and_more.py
+++ b/src/registrar/migrations/0003_rename_is_election_office_domainapplication_is_election_board_and_more.py
@@ -10,48 +10,48 @@ class Migration(migrations.Migration):
operations = [
migrations.RenameField(
- model_name="DomainRequest",
+ model_name="domainapplication",
old_name="is_election_office",
new_name="is_election_board",
),
migrations.RenameField(
- model_name="DomainRequest",
+ model_name="domainapplication",
old_name="acknowledged_policy",
new_name="is_policy_acknowledged",
),
migrations.RenameField(
- model_name="DomainRequest",
+ model_name="domainapplication",
old_name="zip_code",
new_name="zipcode",
),
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_branch",
),
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="street_address",
),
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="unit_number",
),
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="unit_type",
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line1",
field=models.TextField(blank=True, help_text="Address line 1", null=True),
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line2",
field=models.CharField(blank=True, help_text="Address line 2", max_length=15, null=True),
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_type",
field=models.CharField(
blank=True,
@@ -66,7 +66,7 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="organization_type",
field=models.CharField(
blank=True,
diff --git a/src/registrar/migrations/0004_domainapplication_federal_agency.py b/src/registrar/migrations/0004_domainapplication_federal_agency.py
index cffe5a864..a00d46ac2 100644
--- a/src/registrar/migrations/0004_domainapplication_federal_agency.py
+++ b/src/registrar/migrations/0004_domainapplication_federal_agency.py
@@ -7,13 +7,13 @@ class Migration(migrations.Migration):
dependencies = [
(
"registrar",
- "0003_rename_is_election_office_DomainRequest_is_election_board_and_more",
+ "0003_rename_is_election_office_domainapplication_is_election_board_and_more",
),
]
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_agency",
field=models.TextField(help_text="Top level federal agency", null=True),
),
diff --git a/src/registrar/migrations/0005_domainapplication_city_and_more.py b/src/registrar/migrations/0005_domainapplication_city_and_more.py
index 4f933ceb2..bd4683b8c 100644
--- a/src/registrar/migrations/0005_domainapplication_city_and_more.py
+++ b/src/registrar/migrations/0005_domainapplication_city_and_more.py
@@ -5,22 +5,22 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0004_DomainRequest_federal_agency"),
+ ("registrar", "0004_domainapplication_federal_agency"),
]
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="city",
field=models.TextField(blank=True, help_text="City", null=True),
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="urbanization",
field=models.TextField(blank=True, help_text="Urbanization", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_agency",
field=models.TextField(blank=True, help_text="Top level federal agency", null=True),
),
diff --git a/src/registrar/migrations/0006_alter_contact_phone.py b/src/registrar/migrations/0006_alter_contact_phone.py
index 09bcc1fbb..1e055694f 100644
--- a/src/registrar/migrations/0006_alter_contact_phone.py
+++ b/src/registrar/migrations/0006_alter_contact_phone.py
@@ -6,7 +6,7 @@ import phonenumber_field.modelfields # type: ignore
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0005_DomainRequest_city_and_more"),
+ ("registrar", "0005_domainapplication_city_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0007_domainapplication_more_organization_information_and_more.py b/src/registrar/migrations/0007_domainapplication_more_organization_information_and_more.py
index e6199ea86..49df16fbb 100644
--- a/src/registrar/migrations/0007_domainapplication_more_organization_information_and_more.py
+++ b/src/registrar/migrations/0007_domainapplication_more_organization_information_and_more.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="more_organization_information",
field=models.TextField(
blank=True,
@@ -19,27 +19,27 @@ class Migration(migrations.Migration):
),
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="type_of_work",
field=models.TextField(blank=True, help_text="Type of work of the organization", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line1",
field=models.TextField(blank=True, help_text="Street address", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line2",
field=models.CharField(blank=True, help_text="Street address line 2", max_length=15, null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_agency",
field=models.TextField(blank=True, help_text="Federal agency", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_type",
field=models.CharField(
blank=True,
@@ -54,7 +54,7 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="organization_type",
field=models.CharField(
blank=True,
@@ -89,12 +89,12 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="purpose",
field=models.TextField(blank=True, help_text="Purpose of your domain", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="state_territory",
field=models.CharField(
blank=True,
@@ -104,12 +104,12 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="urbanization",
field=models.TextField(blank=True, help_text="Urbanization (Puerto Rico only)", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="zipcode",
field=models.CharField(
blank=True,
diff --git a/src/registrar/migrations/0008_remove_userprofile_created_at_and_more.py b/src/registrar/migrations/0008_remove_userprofile_created_at_and_more.py
index 045e83f49..2e2dbed6c 100644
--- a/src/registrar/migrations/0008_remove_userprofile_created_at_and_more.py
+++ b/src/registrar/migrations/0008_remove_userprofile_created_at_and_more.py
@@ -6,7 +6,7 @@ import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0007_DomainRequest_more_organization_information_and_more"),
+ ("registrar", "0007_domainapplication_more_organization_information_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0009_domainapplication_federally_recognized_tribe_and_more.py b/src/registrar/migrations/0009_domainapplication_federally_recognized_tribe_and_more.py
index 2c9c26888..7fce25b9e 100644
--- a/src/registrar/migrations/0009_domainapplication_federally_recognized_tribe_and_more.py
+++ b/src/registrar/migrations/0009_domainapplication_federally_recognized_tribe_and_more.py
@@ -10,17 +10,17 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federally_recognized_tribe",
field=models.BooleanField(help_text="Is the tribe federally recognized", null=True),
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="state_recognized_tribe",
field=models.BooleanField(help_text="Is the tribe recognized by a state", null=True),
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="tribe_name",
field=models.TextField(blank=True, help_text="Name of tribe", null=True),
),
diff --git a/src/registrar/migrations/0010_domainapplication_no_other_contacts_rationale.py b/src/registrar/migrations/0010_domainapplication_no_other_contacts_rationale.py
index 412fcc6db..bf8d83d60 100644
--- a/src/registrar/migrations/0010_domainapplication_no_other_contacts_rationale.py
+++ b/src/registrar/migrations/0010_domainapplication_no_other_contacts_rationale.py
@@ -5,12 +5,12 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0009_DomainRequest_federally_recognized_tribe_and_more"),
+ ("registrar", "0009_domainapplication_federally_recognized_tribe_and_more"),
]
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="no_other_contacts_rationale",
field=models.TextField(
blank=True,
diff --git a/src/registrar/migrations/0011_remove_domainapplication_security_email.py b/src/registrar/migrations/0011_remove_domainapplication_security_email.py
index 5d5c278ac..c717408da 100644
--- a/src/registrar/migrations/0011_remove_domainapplication_security_email.py
+++ b/src/registrar/migrations/0011_remove_domainapplication_security_email.py
@@ -5,12 +5,12 @@ from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0010_DomainRequest_no_other_contacts_rationale"),
+ ("registrar", "0010_domainapplication_no_other_contacts_rationale"),
]
operations = [
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="security_email",
),
]
diff --git a/src/registrar/migrations/0012_delete_userprofile.py b/src/registrar/migrations/0012_delete_userprofile.py
index 29305d519..b5bcebb95 100644
--- a/src/registrar/migrations/0012_delete_userprofile.py
+++ b/src/registrar/migrations/0012_delete_userprofile.py
@@ -7,7 +7,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0011_remove_DomainRequest_security_email"),
+ ("registrar", "0011_remove_domainapplication_security_email"),
]
operations = [
diff --git a/src/registrar/migrations/0017_alter_domainapplication_status_and_more.py b/src/registrar/migrations/0017_alter_domainapplication_status_and_more.py
index 341c83994..5d20551d7 100644
--- a/src/registrar/migrations/0017_alter_domainapplication_status_and_more.py
+++ b/src/registrar/migrations/0017_alter_domainapplication_status_and_more.py
@@ -11,7 +11,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="status",
field=django_fsm.FSMField(
choices=[
diff --git a/src/registrar/migrations/0018_domaininformation.py b/src/registrar/migrations/0018_domaininformation.py
index 38a24f7d8..582a6e244 100644
--- a/src/registrar/migrations/0018_domaininformation.py
+++ b/src/registrar/migrations/0018_domaininformation.py
@@ -7,7 +7,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0017_alter_DomainRequest_status_and_more"),
+ ("registrar", "0017_alter_domainapplication_status_and_more"),
]
operations = [
@@ -229,14 +229,14 @@ class Migration(migrations.Migration):
),
),
(
- "domain_request",
+ "domain_application",
models.OneToOneField(
blank=True,
- help_text="Associated domain request",
+ help_text="Associated domain application",
null=True,
on_delete=django.db.models.deletion.PROTECT,
- related_name="DomainRequest_info",
- to="registrar.DomainRequest",
+ related_name="domainapplication_info",
+ to="registrar.domainapplication",
),
),
(
diff --git a/src/registrar/migrations/0019_alter_domainapplication_organization_type.py b/src/registrar/migrations/0019_alter_domainapplication_organization_type.py
index 60273e854..1a7397255 100644
--- a/src/registrar/migrations/0019_alter_domainapplication_organization_type.py
+++ b/src/registrar/migrations/0019_alter_domainapplication_organization_type.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="organization_type",
field=models.CharField(
blank=True,
diff --git a/src/registrar/migrations/0020_remove_domaininformation_security_email.py b/src/registrar/migrations/0020_remove_domaininformation_security_email.py
index b48133ade..9742c294a 100644
--- a/src/registrar/migrations/0020_remove_domaininformation_security_email.py
+++ b/src/registrar/migrations/0020_remove_domaininformation_security_email.py
@@ -5,7 +5,7 @@ from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0019_alter_DomainRequest_organization_type"),
+ ("registrar", "0019_alter_domainapplication_organization_type"),
]
operations = [
diff --git a/src/registrar/migrations/0022_draftdomain_domainapplication_approved_domain_and_more.py b/src/registrar/migrations/0022_draftdomain_domainapplication_approved_domain_and_more.py
index 6a44c93d9..fb89e0eb2 100644
--- a/src/registrar/migrations/0022_draftdomain_domainapplication_approved_domain_and_more.py
+++ b/src/registrar/migrations/0022_draftdomain_domainapplication_approved_domain_and_more.py
@@ -40,26 +40,26 @@ class Migration(migrations.Migration):
bases=(models.Model, registrar.models.utility.domain_helper.DomainHelper), # type: ignore
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="approved_domain",
field=models.OneToOneField(
blank=True,
help_text="The approved domain",
null=True,
on_delete=django.db.models.deletion.PROTECT,
- related_name="domain_request",
+ related_name="domain_application",
to="registrar.domain",
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="requested_domain",
field=models.OneToOneField(
blank=True,
help_text="The requested domain",
null=True,
on_delete=django.db.models.deletion.PROTECT,
- related_name="domain_request",
+ related_name="domain_application",
to="registrar.draftdomain",
),
),
diff --git a/src/registrar/migrations/0023_alter_contact_first_name_alter_contact_last_name_and_more.py b/src/registrar/migrations/0023_alter_contact_first_name_alter_contact_last_name_and_more.py
index 85ba6268b..b2259f650 100644
--- a/src/registrar/migrations/0023_alter_contact_first_name_alter_contact_last_name_and_more.py
+++ b/src/registrar/migrations/0023_alter_contact_first_name_alter_contact_last_name_and_more.py
@@ -5,7 +5,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0022_draftdomain_DomainRequest_approved_domain_and_more"),
+ ("registrar", "0022_draftdomain_domainapplication_approved_domain_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0026_alter_domainapplication_address_line2_and_more.py b/src/registrar/migrations/0026_alter_domainapplication_address_line2_and_more.py
index 5ec43af43..77da9e79c 100644
--- a/src/registrar/migrations/0026_alter_domainapplication_address_line2_and_more.py
+++ b/src/registrar/migrations/0026_alter_domainapplication_address_line2_and_more.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line2",
field=models.TextField(blank=True, help_text="Street address line 2", null=True),
),
diff --git a/src/registrar/migrations/0027_alter_domaininformation_address_line1_and_more.py b/src/registrar/migrations/0027_alter_domaininformation_address_line1_and_more.py
index 0d25ec506..9f362c956 100644
--- a/src/registrar/migrations/0027_alter_domaininformation_address_line1_and_more.py
+++ b/src/registrar/migrations/0027_alter_domaininformation_address_line1_and_more.py
@@ -5,7 +5,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0026_alter_DomainRequest_address_line2_and_more"),
+ ("registrar", "0026_alter_domainapplication_address_line2_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0028_alter_domainapplication_status.py b/src/registrar/migrations/0028_alter_domainapplication_status.py
index ed2544779..61b1c0505 100644
--- a/src/registrar/migrations/0028_alter_domainapplication_status.py
+++ b/src/registrar/migrations/0028_alter_domainapplication_status.py
@@ -13,7 +13,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="status",
field=django_fsm.FSMField(
choices=[
diff --git a/src/registrar/migrations/0029_user_status_alter_domainapplication_status.py b/src/registrar/migrations/0029_user_status_alter_domainapplication_status.py
index f3c9bea83..504358665 100644
--- a/src/registrar/migrations/0029_user_status_alter_domainapplication_status.py
+++ b/src/registrar/migrations/0029_user_status_alter_domainapplication_status.py
@@ -6,7 +6,7 @@ import django_fsm
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0028_alter_DomainRequest_status"),
+ ("registrar", "0028_alter_domainapplication_status"),
]
operations = [
@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="status",
field=django_fsm.FSMField(
choices=[
diff --git a/src/registrar/migrations/0030_alter_user_status.py b/src/registrar/migrations/0030_alter_user_status.py
index a1055017b..7dd27bfa4 100644
--- a/src/registrar/migrations/0030_alter_user_status.py
+++ b/src/registrar/migrations/0030_alter_user_status.py
@@ -5,7 +5,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0029_user_status_alter_DomainRequest_status"),
+ ("registrar", "0029_user_status_alter_domainapplication_status"),
]
operations = [
diff --git a/src/registrar/migrations/0031_transitiondomain_and_more.py b/src/registrar/migrations/0031_transitiondomain_and_more.py
index a3982fd6a..9d1153764 100644
--- a/src/registrar/migrations/0031_transitiondomain_and_more.py
+++ b/src/registrar/migrations/0031_transitiondomain_and_more.py
@@ -77,11 +77,11 @@ class Migration(migrations.Migration):
},
),
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="more_organization_information",
),
migrations.RemoveField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="type_of_work",
),
migrations.RemoveField(
@@ -93,7 +93,7 @@ class Migration(migrations.Migration):
name="type_of_work",
),
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="about_your_organization",
field=models.TextField(blank=True, help_text="Information about your organization", null=True),
),
@@ -103,14 +103,14 @@ class Migration(migrations.Migration):
field=models.TextField(blank=True, help_text="Information about your organization", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="approved_domain",
field=models.OneToOneField(
blank=True,
help_text="The approved domain",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
- related_name="domain_request",
+ related_name="domain_application",
to="registrar.domain",
),
),
diff --git a/src/registrar/migrations/0041_alter_domainapplication_organization_type_and_more.py b/src/registrar/migrations/0041_alter_domainapplication_organization_type_and_more.py
index 57201c1bf..07cfe0e77 100644
--- a/src/registrar/migrations/0041_alter_domainapplication_organization_type_and_more.py
+++ b/src/registrar/migrations/0041_alter_domainapplication_organization_type_and_more.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="organization_type",
field=models.CharField(
blank=True,
diff --git a/src/registrar/migrations/0042_create_groups_v03.py b/src/registrar/migrations/0042_create_groups_v03.py
index 2d23d870f..01b7985bf 100644
--- a/src/registrar/migrations/0042_create_groups_v03.py
+++ b/src/registrar/migrations/0042_create_groups_v03.py
@@ -25,7 +25,7 @@ def create_groups(apps, schema_editor) -> Any:
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0041_alter_DomainRequest_organization_type_and_more"),
+ ("registrar", "0041_alter_domainapplication_organization_type_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0049_alter_domainapplication_current_websites_and_more.py b/src/registrar/migrations/0049_alter_domainapplication_current_websites_and_more.py
index 49516deb7..4341bdad6 100644
--- a/src/registrar/migrations/0049_alter_domainapplication_current_websites_and_more.py
+++ b/src/registrar/migrations/0049_alter_domainapplication_current_websites_and_more.py
@@ -10,14 +10,14 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="current_websites",
field=models.ManyToManyField(
blank=True, related_name="current+", to="registrar.website", verbose_name="websites"
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="other_contacts",
field=models.ManyToManyField(
blank=True, related_name="contact_applications", to="registrar.contact", verbose_name="contacts"
diff --git a/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py b/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py
index 67ad4e1c6..4009d17d9 100644
--- a/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py
+++ b/src/registrar/migrations/0050_alter_contact_middle_name_and_more.py
@@ -5,7 +5,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0049_alter_DomainRequest_current_websites_and_more"),
+ ("registrar", "0049_alter_domainapplication_current_websites_and_more"),
]
operations = [
@@ -15,7 +15,7 @@ class Migration(migrations.Migration):
field=models.TextField(blank=True, help_text="Middle name (optional)", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line2",
field=models.TextField(blank=True, help_text="Street address line 2 (optional)", null=True),
),
diff --git a/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py b/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py
index 93865b021..9b012042d 100644
--- a/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py
+++ b/src/registrar/migrations/0051_alter_domainapplication_urbanization_and_more.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="urbanization",
field=models.TextField(blank=True, help_text="Urbanization (required for Puerto Rico only)", null=True),
),
diff --git a/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py b/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py
index c4d8d8807..1d5607aad 100644
--- a/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py
+++ b/src/registrar/migrations/0052_alter_domainapplication_anything_else_and_more.py
@@ -5,12 +5,12 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0051_alter_DomainRequest_urbanization_and_more"),
+ ("registrar", "0051_alter_domainapplication_urbanization_and_more"),
]
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="anything_else",
field=models.TextField(blank=True, help_text="Anything else?", null=True),
),
diff --git a/src/registrar/migrations/0053_create_groups_v05.py b/src/registrar/migrations/0053_create_groups_v05.py
index 3df23d152..aaf74a9db 100644
--- a/src/registrar/migrations/0053_create_groups_v05.py
+++ b/src/registrar/migrations/0053_create_groups_v05.py
@@ -25,7 +25,7 @@ def create_groups(apps, schema_editor) -> Any:
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0052_alter_DomainRequest_anything_else_and_more"),
+ ("registrar", "0052_alter_domainapplication_anything_else_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0054_alter_domainapplication_federal_agency_and_more.py b/src/registrar/migrations/0054_alter_domainapplication_federal_agency_and_more.py
index 2f00c1958..d16c9befd 100644
--- a/src/registrar/migrations/0054_alter_domainapplication_federal_agency_and_more.py
+++ b/src/registrar/migrations/0054_alter_domainapplication_federal_agency_and_more.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_agency",
field=models.TextField(
blank=True,
@@ -317,7 +317,7 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="state_territory",
field=models.CharField(
blank=True,
diff --git a/src/registrar/migrations/0055_transitiondomain_processed.py b/src/registrar/migrations/0055_transitiondomain_processed.py
index 1261fb451..a2fb78edd 100644
--- a/src/registrar/migrations/0055_transitiondomain_processed.py
+++ b/src/registrar/migrations/0055_transitiondomain_processed.py
@@ -5,7 +5,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0054_alter_DomainRequest_federal_agency_and_more"),
+ ("registrar", "0054_alter_domainapplication_federal_agency_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0056_alter_domain_state_alter_domainapplication_status_and_more.py b/src/registrar/migrations/0056_alter_domain_state_alter_domainapplication_status_and_more.py
index 7ee51b73e..097cddf8a 100644
--- a/src/registrar/migrations/0056_alter_domain_state_alter_domainapplication_status_and_more.py
+++ b/src/registrar/migrations/0056_alter_domain_state_alter_domainapplication_status_and_more.py
@@ -28,7 +28,7 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="status",
field=django_fsm.FSMField(
choices=[
diff --git a/src/registrar/migrations/0057_domainapplication_submission_date.py b/src/registrar/migrations/0057_domainapplication_submission_date.py
index 7e914e8f1..a2a170888 100644
--- a/src/registrar/migrations/0057_domainapplication_submission_date.py
+++ b/src/registrar/migrations/0057_domainapplication_submission_date.py
@@ -5,12 +5,12 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0056_alter_domain_state_alter_DomainRequest_status_and_more"),
+ ("registrar", "0056_alter_domain_state_alter_domainapplication_status_and_more"),
]
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="submission_date",
field=models.DateField(blank=True, default=None, help_text="Date submitted", null=True),
),
diff --git a/src/registrar/migrations/0058_alter_domaininformation_options.py b/src/registrar/migrations/0058_alter_domaininformation_options.py
index db6e7b24f..2e128cbda 100644
--- a/src/registrar/migrations/0058_alter_domaininformation_options.py
+++ b/src/registrar/migrations/0058_alter_domaininformation_options.py
@@ -5,7 +5,7 @@ from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0057_DomainRequest_submission_date"),
+ ("registrar", "0057_domainapplication_submission_date"),
]
operations = [
diff --git a/src/registrar/migrations/0064_alter_domainapplication_address_line1_and_more.py b/src/registrar/migrations/0064_alter_domainapplication_address_line1_and_more.py
index 238f084f3..7241c7164 100644
--- a/src/registrar/migrations/0064_alter_domainapplication_address_line1_and_more.py
+++ b/src/registrar/migrations/0064_alter_domainapplication_address_line1_and_more.py
@@ -10,12 +10,12 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line1",
field=models.TextField(blank=True, help_text="Street address", null=True, verbose_name="Address line 1"),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line2",
field=models.TextField(
blank=True, help_text="Street address line 2 (optional)", null=True, verbose_name="Address line 2"
diff --git a/src/registrar/migrations/0065_create_groups_v06.py b/src/registrar/migrations/0065_create_groups_v06.py
index aa943c174..d2cb32cee 100644
--- a/src/registrar/migrations/0065_create_groups_v06.py
+++ b/src/registrar/migrations/0065_create_groups_v06.py
@@ -25,7 +25,7 @@ def create_groups(apps, schema_editor) -> Any:
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0064_alter_DomainRequest_address_line1_and_more"),
+ ("registrar", "0064_alter_domainapplication_address_line1_and_more"),
]
operations = [
diff --git a/src/registrar/migrations/0068_domainapplication_notes_domaininformation_notes.py b/src/registrar/migrations/0068_domainapplication_notes_domaininformation_notes.py
index ddf3dc914..ea94be77e 100644
--- a/src/registrar/migrations/0068_domainapplication_notes_domaininformation_notes.py
+++ b/src/registrar/migrations/0068_domainapplication_notes_domaininformation_notes.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="notes",
field=models.TextField(blank=True, help_text="Notes about this request", null=True),
),
diff --git a/src/registrar/migrations/0069_alter_contact_email_alter_contact_first_name_and_more.py b/src/registrar/migrations/0069_alter_contact_email_alter_contact_first_name_and_more.py
index b6b546d67..5869e6fae 100644
--- a/src/registrar/migrations/0069_alter_contact_email_alter_contact_first_name_and_more.py
+++ b/src/registrar/migrations/0069_alter_contact_email_alter_contact_first_name_and_more.py
@@ -6,7 +6,7 @@ import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0068_DomainRequest_notes_domaininformation_notes"),
+ ("registrar", "0068_domainapplication_notes_domaininformation_notes"),
]
operations = [
diff --git a/src/registrar/migrations/0070_domainapplication_rejection_reason.py b/src/registrar/migrations/0070_domainapplication_rejection_reason.py
index 4ce7aa83f..d559973e2 100644
--- a/src/registrar/migrations/0070_domainapplication_rejection_reason.py
+++ b/src/registrar/migrations/0070_domainapplication_rejection_reason.py
@@ -10,7 +10,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="rejection_reason",
field=models.TextField(
blank=True,
diff --git a/src/registrar/migrations/0071_alter_contact_first_name_alter_contact_last_name_and_more.py b/src/registrar/migrations/0071_alter_contact_first_name_alter_contact_last_name_and_more.py
index af28dbf56..bc594138e 100644
--- a/src/registrar/migrations/0071_alter_contact_first_name_alter_contact_last_name_and_more.py
+++ b/src/registrar/migrations/0071_alter_contact_first_name_alter_contact_last_name_and_more.py
@@ -7,7 +7,7 @@ import phonenumber_field.modelfields
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0070_DomainRequest_rejection_reason"),
+ ("registrar", "0070_domainapplication_rejection_reason"),
]
operations = [
@@ -32,24 +32,24 @@ class Migration(migrations.Migration):
field=models.CharField(blank=True, null=True, verbose_name="title or role in your organization"),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line1",
field=models.CharField(blank=True, help_text="Street address", null=True, verbose_name="Address line 1"),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="address_line2",
field=models.CharField(
blank=True, help_text="Street address line 2 (optional)", null=True, verbose_name="Address line 2"
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="city",
field=models.CharField(blank=True, help_text="City", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="federal_agency",
field=models.CharField(
blank=True,
@@ -356,17 +356,17 @@ class Migration(migrations.Migration):
),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="organization_name",
field=models.CharField(blank=True, db_index=True, help_text="Organization name", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="tribe_name",
field=models.CharField(blank=True, help_text="Name of tribe", null=True),
),
migrations.AlterField(
- model_name="DomainRequest",
+ model_name="domainapplication",
name="urbanization",
field=models.CharField(blank=True, help_text="Urbanization (required for Puerto Rico only)", null=True),
),
From d8fcc9f41a66b676c2f8eed0db90bc50a863052b Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 29 Feb 2024 20:53:37 -0700
Subject: [PATCH 08/29] Added Migration
---
.../migrations/0072_domainrequest_and_more.py | 685 ++++++++++++++++++
1 file changed, 685 insertions(+)
create mode 100644 src/registrar/migrations/0072_domainrequest_and_more.py
diff --git a/src/registrar/migrations/0072_domainrequest_and_more.py b/src/registrar/migrations/0072_domainrequest_and_more.py
new file mode 100644
index 000000000..03d624834
--- /dev/null
+++ b/src/registrar/migrations/0072_domainrequest_and_more.py
@@ -0,0 +1,685 @@
+# Generated by Django 4.2.10 on 2024-03-01 03:52
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+import django_fsm
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("registrar", "0071_alter_contact_first_name_alter_contact_last_name_and_more"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name="DomainRequest",
+ fields=[
+ ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
+ ("created_at", models.DateTimeField(auto_now_add=True)),
+ ("updated_at", models.DateTimeField(auto_now=True)),
+ (
+ "status",
+ django_fsm.FSMField(
+ choices=[
+ ("started", "Started"),
+ ("submitted", "Submitted"),
+ ("in review", "In review"),
+ ("action needed", "Action needed"),
+ ("approved", "Approved"),
+ ("withdrawn", "Withdrawn"),
+ ("rejected", "Rejected"),
+ ("ineligible", "Ineligible"),
+ ],
+ default="started",
+ max_length=50,
+ ),
+ ),
+ (
+ "rejection_reason",
+ models.TextField(
+ blank=True,
+ choices=[
+ ("purpose_not_met", "Purpose requirements not met"),
+ ("requestor_not_eligible", "Requestor not eligible to make request"),
+ ("org_has_domain", "Org already has a .gov domain"),
+ ("contacts_not_verified", "Org contacts couldn't be verified"),
+ ("org_not_eligible", "Org not eligible for a .gov domain"),
+ ("naming_not_met", "Naming requirements not met"),
+ ("other", "Other/Unspecified"),
+ ],
+ null=True,
+ ),
+ ),
+ (
+ "organization_type",
+ 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"),
+ ],
+ help_text="Type of organization",
+ max_length=255,
+ null=True,
+ ),
+ ),
+ (
+ "federally_recognized_tribe",
+ models.BooleanField(help_text="Is the tribe federally recognized", null=True),
+ ),
+ (
+ "state_recognized_tribe",
+ models.BooleanField(help_text="Is the tribe recognized by a state", null=True),
+ ),
+ ("tribe_name", models.CharField(blank=True, help_text="Name of tribe", null=True)),
+ (
+ "federal_agency",
+ 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"),
+ ],
+ help_text="Federal agency",
+ null=True,
+ ),
+ ),
+ (
+ "federal_type",
+ models.CharField(
+ blank=True,
+ choices=[("executive", "Executive"), ("judicial", "Judicial"), ("legislative", "Legislative")],
+ help_text="Federal government branch",
+ max_length=50,
+ null=True,
+ ),
+ ),
+ (
+ "is_election_board",
+ models.BooleanField(blank=True, help_text="Is your organization an election office?", null=True),
+ ),
+ (
+ "organization_name",
+ models.CharField(blank=True, db_index=True, help_text="Organization name", null=True),
+ ),
+ (
+ "address_line1",
+ models.CharField(blank=True, help_text="Street address", null=True, verbose_name="Address line 1"),
+ ),
+ (
+ "address_line2",
+ models.CharField(
+ blank=True,
+ help_text="Street address line 2 (optional)",
+ null=True,
+ verbose_name="Address line 2",
+ ),
+ ),
+ ("city", models.CharField(blank=True, help_text="City", null=True)),
+ (
+ "state_territory",
+ 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)"),
+ ],
+ help_text="State, territory, or military post",
+ max_length=2,
+ null=True,
+ ),
+ ),
+ (
+ "zipcode",
+ models.CharField(blank=True, db_index=True, help_text="Zip code", max_length=10, null=True),
+ ),
+ (
+ "urbanization",
+ models.CharField(blank=True, help_text="Urbanization (required for Puerto Rico only)", null=True),
+ ),
+ (
+ "about_your_organization",
+ models.TextField(blank=True, help_text="Information about your organization", null=True),
+ ),
+ ("purpose", models.TextField(blank=True, help_text="Purpose of your domain", null=True)),
+ (
+ "no_other_contacts_rationale",
+ models.TextField(blank=True, help_text="Reason for listing no additional contacts", null=True),
+ ),
+ ("anything_else", models.TextField(blank=True, help_text="Anything else?", null=True)),
+ (
+ "is_policy_acknowledged",
+ models.BooleanField(blank=True, help_text="Acknowledged .gov acceptable use policy", null=True),
+ ),
+ ("submission_date", models.DateField(blank=True, default=None, help_text="Date submitted", null=True)),
+ ("notes", models.TextField(blank=True, help_text="Notes about this request", null=True)),
+ (
+ "alternative_domains",
+ models.ManyToManyField(blank=True, related_name="alternatives+", to="registrar.website"),
+ ),
+ (
+ "approved_domain",
+ models.OneToOneField(
+ blank=True,
+ help_text="The approved domain",
+ null=True,
+ on_delete=django.db.models.deletion.SET_NULL,
+ related_name="domain_request",
+ to="registrar.domain",
+ ),
+ ),
+ (
+ "authorizing_official",
+ models.ForeignKey(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="authorizing_official",
+ to="registrar.contact",
+ ),
+ ),
+ (
+ "creator",
+ models.ForeignKey(
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="domain_requests_created",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ (
+ "current_websites",
+ models.ManyToManyField(
+ blank=True, related_name="current+", to="registrar.website", verbose_name="websites"
+ ),
+ ),
+ (
+ "investigator",
+ models.ForeignKey(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.SET_NULL,
+ related_name="domain_requests_investigating",
+ to=settings.AUTH_USER_MODEL,
+ ),
+ ),
+ (
+ "other_contacts",
+ models.ManyToManyField(
+ blank=True,
+ related_name="contact_domain_requests",
+ to="registrar.contact",
+ verbose_name="contacts",
+ ),
+ ),
+ (
+ "requested_domain",
+ models.OneToOneField(
+ blank=True,
+ help_text="The requested domain",
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="domain_request",
+ to="registrar.draftdomain",
+ ),
+ ),
+ (
+ "submitter",
+ models.ForeignKey(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="submitted_domain_requests",
+ to="registrar.contact",
+ ),
+ ),
+ ],
+ options={
+ "abstract": False,
+ },
+ ),
+ migrations.RemoveField(
+ model_name="domaininformation",
+ name="domain_application",
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="other_contacts",
+ field=models.ManyToManyField(
+ blank=True,
+ related_name="contact_domain_requests_information",
+ to="registrar.contact",
+ verbose_name="contacts",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="domaininformation",
+ name="submitter",
+ field=models.ForeignKey(
+ blank=True,
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="submitted_domain_requests_information",
+ to="registrar.contact",
+ ),
+ ),
+ migrations.DeleteModel(
+ name="DomainApplication",
+ ),
+ migrations.AddField(
+ model_name="domaininformation",
+ name="domain_request",
+ field=models.OneToOneField(
+ blank=True,
+ help_text="Associated domain request",
+ null=True,
+ on_delete=django.db.models.deletion.PROTECT,
+ related_name="DomainRequest_info",
+ to="registrar.domainrequest",
+ ),
+ ),
+ ]
From 912169377431c5f07bf9b9e924a31c96794ed685 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Fri, 1 Mar 2024 11:39:14 -0700
Subject: [PATCH 09/29] Fixing broken urls & missed file re-namings
---
.../templates/domain_request_form.html | 2 +-
.../templates/domain_request_review.html | 28 +++++++++----------
.../templates/domain_request_sidebar.html | 2 +-
...summary.txt => domain_request_summary.txt} | 0
...n_application.html => domain_request.html} | 0
src/registrar/views/domain_request.py | 2 +-
6 files changed, 17 insertions(+), 17 deletions(-)
rename src/registrar/templates/emails/includes/{application_summary.txt => domain_request_summary.txt} (100%)
rename src/registrar/templates/includes/{domain_application.html => domain_request.html} (100%)
diff --git a/src/registrar/templates/domain_request_form.html b/src/registrar/templates/domain_request_form.html
index db436aeb3..cde12ad80 100644
--- a/src/registrar/templates/domain_request_form.html
+++ b/src/registrar/templates/domain_request_form.html
@@ -11,7 +11,7 @@
",
)
diff --git a/src/registrar/tests/test_migrations.py b/src/registrar/tests/test_migrations.py
index 4dcfd89bb..50861d97f 100644
--- a/src/registrar/tests/test_migrations.py
+++ b/src/registrar/tests/test_migrations.py
@@ -34,10 +34,10 @@ class TestGroups(TestCase):
"view_logentry",
"change_contact",
"view_domain",
- "change_DomainRequest",
"change_domaininformation",
"add_domaininvitation",
"view_domaininvitation",
+ "change_domainrequest",
"change_draftdomain",
"analyst_access_permission",
"change_user",
From 2340b6c800619acf6698f3353c6ba9b21e729d26 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 7 Mar 2024 14:19:15 -0700
Subject: [PATCH 13/29] Revert some mis-renamed instances of "application" +
other minor fixes
---
src/registrar/assets/sass/_theme/_admin.scss | 9 +++++++++
src/registrar/models/utility/generic_helper.py | 2 +-
.../templates/django/admin/domain_change_form.html | 2 +-
src/registrar/tests/test_admin.py | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss
index b57c6a015..78c76f090 100644
--- a/src/registrar/assets/sass/_theme/_admin.scss
+++ b/src/registrar/assets/sass/_theme/_admin.scss
@@ -135,12 +135,21 @@ html[data-theme="dark"] {
color: var(--primary-fg);
}
+
+
#branding h1,
h1, h2, h3,
.module h2 {
font-weight: font-weight('bold');
}
+#content h2
+{
+ color:red;
+ font-size: 1rem;
+}
+
+
.module h3 {
padding: 0;
color: var(--link-fg);
diff --git a/src/registrar/models/utility/generic_helper.py b/src/registrar/models/utility/generic_helper.py
index dca56f13c..01d4e6b33 100644
--- a/src/registrar/models/utility/generic_helper.py
+++ b/src/registrar/models/utility/generic_helper.py
@@ -16,7 +16,7 @@ class Timer:
Note that this class does not account for general randomness as more
robust libraries do, so there is some tiny amount of latency involved
- in using this, but it is minimal enough that for most domain requests it is not
+ in using this, but it is minimal enough that for most applications it is not
noticable.
Usage:
diff --git a/src/registrar/templates/django/admin/domain_change_form.html b/src/registrar/templates/django/admin/domain_change_form.html
index 65cbd1db0..67c5ac291 100644
--- a/src/registrar/templates/django/admin/domain_change_form.html
+++ b/src/registrar/templates/django/admin/domain_change_form.html
@@ -50,7 +50,7 @@
This is controlled by the class `dja-form-placeholder` on the button.
In addition, the modal element MUST be placed low in the DOM. The script loads slower on DJA than on other portions
- of the domain_request, so this means that it will briefly "populate", causing unintended visual effects.
+ of the application, so this means that it will briefly "populate", causing unintended visual effects.
{% endcomment %}
Date: Thu, 7 Mar 2024 14:52:58 -0700
Subject: [PATCH 14/29] fixed migrations
---
...mainrequest_and_more.py => 0073_domainrequest_and_more.py} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename src/registrar/migrations/{0072_domainrequest_and_more.py => 0073_domainrequest_and_more.py} (99%)
diff --git a/src/registrar/migrations/0072_domainrequest_and_more.py b/src/registrar/migrations/0073_domainrequest_and_more.py
similarity index 99%
rename from src/registrar/migrations/0072_domainrequest_and_more.py
rename to src/registrar/migrations/0073_domainrequest_and_more.py
index 03d624834..88608b03a 100644
--- a/src/registrar/migrations/0072_domainrequest_and_more.py
+++ b/src/registrar/migrations/0073_domainrequest_and_more.py
@@ -1,4 +1,4 @@
-# Generated by Django 4.2.10 on 2024-03-01 03:52
+# Generated by Django 4.2.10 on 2024-03-07 21:52
from django.conf import settings
from django.db import migrations, models
@@ -9,7 +9,7 @@ import django_fsm
class Migration(migrations.Migration):
dependencies = [
- ("registrar", "0071_alter_contact_first_name_alter_contact_last_name_and_more"),
+ ("registrar", "0072_alter_publiccontact_fax_alter_publiccontact_voice"),
]
operations = [
From 84c221bac65f4197bfaf429350559da82b40ae15 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 7 Mar 2024 15:06:34 -0700
Subject: [PATCH 15/29] camel-case correction for targeted models
---
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 c9eea460d..c9107969a 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -486,7 +486,7 @@ class MyUserAdmin(BaseUserAdmin):
field_name = request_get.get("field_name", None)
# Make sure we're only modifying requests from these models.
- models_to_target = {"DomainRequest"}
+ models_to_target = {"domain_request"}
if model_name in models_to_target:
# Define rules per field
match field_name:
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index 013000fb2..ec9c1e7d3 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -1466,7 +1466,7 @@ class TestDomainRequestAdmin(MockEppLib):
# Grab the current dropdown. We do an API call to autocomplete to get this info.
domain_request_queryset = self.admin.formfield_for_foreignkey(investigator_field, request).queryset
user_request = self.factory.post(
- "/admin/autocomplete/?app_label=registrar&model_name=DomainRequest&field_name=investigator"
+ "/admin/autocomplete/?app_label=registrar&model_name=domain_request&field_name=investigator"
)
user_admin = MyUserAdmin(User, self.site)
user_queryset = user_admin.get_search_results(user_request, domain_request_queryset, None)[0]
From 97eca957862de0de41b8596dbee27688ea5bbba0 Mon Sep 17 00:00:00 2001
From: Alysia Broddrick
Date: Thu, 7 Mar 2024 14:22:24 -0800
Subject: [PATCH 16/29] increase isntances on development to allow for zero
downtime
---
ops/manifests/manifest-development.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ops/manifests/manifest-development.yaml b/ops/manifests/manifest-development.yaml
index 08244cf08..23558ba4c 100644
--- a/ops/manifests/manifest-development.yaml
+++ b/ops/manifests/manifest-development.yaml
@@ -4,7 +4,7 @@ applications:
buildpacks:
- python_buildpack
path: ../../src
- instances: 1
+ instances: 2
memory: 512M
stack: cflinuxfs4
timeout: 180
From 19fb8a0c04ec9364eedd68368aa18c8b2a50cedf Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 7 Mar 2024 15:24:00 -0700
Subject: [PATCH 17/29] remove css experiment & revert camel-case change
---
src/registrar/admin.py | 2 +-
src/registrar/assets/sass/_theme/_admin.scss | 7 -------
src/registrar/tests/test_admin.py | 2 +-
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index c9107969a..c9eea460d 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -486,7 +486,7 @@ class MyUserAdmin(BaseUserAdmin):
field_name = request_get.get("field_name", None)
# Make sure we're only modifying requests from these models.
- models_to_target = {"domain_request"}
+ models_to_target = {"DomainRequest"}
if model_name in models_to_target:
# Define rules per field
match field_name:
diff --git a/src/registrar/assets/sass/_theme/_admin.scss b/src/registrar/assets/sass/_theme/_admin.scss
index 78c76f090..9c0d7517c 100644
--- a/src/registrar/assets/sass/_theme/_admin.scss
+++ b/src/registrar/assets/sass/_theme/_admin.scss
@@ -143,13 +143,6 @@ h1, h2, h3,
font-weight: font-weight('bold');
}
-#content h2
-{
- color:red;
- font-size: 1rem;
-}
-
-
.module h3 {
padding: 0;
color: var(--link-fg);
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index ec9c1e7d3..013000fb2 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -1466,7 +1466,7 @@ class TestDomainRequestAdmin(MockEppLib):
# Grab the current dropdown. We do an API call to autocomplete to get this info.
domain_request_queryset = self.admin.formfield_for_foreignkey(investigator_field, request).queryset
user_request = self.factory.post(
- "/admin/autocomplete/?app_label=registrar&model_name=domain_request&field_name=investigator"
+ "/admin/autocomplete/?app_label=registrar&model_name=DomainRequest&field_name=investigator"
)
user_admin = MyUserAdmin(User, self.site)
user_queryset = user_admin.get_search_results(user_request, domain_request_queryset, None)[0]
From a5ecb010b8750fb6aadd5647c77135cf03a6e6f0 Mon Sep 17 00:00:00 2001
From: CocoByte
Date: Thu, 7 Mar 2024 15:31:14 -0700
Subject: [PATCH 18/29] another go at camel-case correction
---
src/registrar/admin.py | 2 +-
src/registrar/tests/test_admin.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/registrar/admin.py b/src/registrar/admin.py
index c9eea460d..50801b79b 100644
--- a/src/registrar/admin.py
+++ b/src/registrar/admin.py
@@ -486,7 +486,7 @@ class MyUserAdmin(BaseUserAdmin):
field_name = request_get.get("field_name", None)
# Make sure we're only modifying requests from these models.
- models_to_target = {"DomainRequest"}
+ models_to_target = {"domainrequest"}
if model_name in models_to_target:
# Define rules per field
match field_name:
diff --git a/src/registrar/tests/test_admin.py b/src/registrar/tests/test_admin.py
index 013000fb2..2b85627ca 100644
--- a/src/registrar/tests/test_admin.py
+++ b/src/registrar/tests/test_admin.py
@@ -1466,7 +1466,7 @@ class TestDomainRequestAdmin(MockEppLib):
# Grab the current dropdown. We do an API call to autocomplete to get this info.
domain_request_queryset = self.admin.formfield_for_foreignkey(investigator_field, request).queryset
user_request = self.factory.post(
- "/admin/autocomplete/?app_label=registrar&model_name=DomainRequest&field_name=investigator"
+ "/admin/autocomplete/?app_label=registrar&model_name=domainrequest&field_name=investigator"
)
user_admin = MyUserAdmin(User, self.site)
user_queryset = user_admin.get_search_results(user_request, domain_request_queryset, None)[0]
@@ -1962,7 +1962,7 @@ class AuditedAdminTest(TestCase):
domain_request_queryset = domain_request_admin.formfield_for_foreignkey(field, domain_request_request).queryset
request = self.factory.post(
- "/admin/autocomplete/?app_label=registrar&model_name=DomainRequest&field_name=investigator"
+ "/admin/autocomplete/?app_label=registrar&model_name=domainrequest&field_name=investigator"
)
sorted_fields = ["first_name", "last_name", "email"]
From 8fb16364fec3c1cce56f886be94158f497be7d7b Mon Sep 17 00:00:00 2001
From: Alysia Broddrick
Date: Thu, 7 Mar 2024 14:51:22 -0800
Subject: [PATCH 19/29] Added test workflow to see if this results in zero
downtime
---
.github/workflows/test-deploy.yaml | 41 ++++++++++++++++++++++++++++++
ops/manifests/manifest-ab.yaml | 2 +-
2 files changed, 42 insertions(+), 1 deletion(-)
create mode 100644 .github/workflows/test-deploy.yaml
diff --git a/.github/workflows/test-deploy.yaml b/.github/workflows/test-deploy.yaml
new file mode 100644
index 000000000..1c6cc95fc
--- /dev/null
+++ b/.github/workflows/test-deploy.yaml
@@ -0,0 +1,41 @@
+# This workflow is to for testing a change to our deploy structure and will be deleted when testing finishes
+
+name: Deploy Main
+run-name: Run deploy for ${{ github.event.inputs.environment }}
+
+on:
+ workflow_dispatch:
+ inputs:
+ environment:
+ type: choice
+ description: Which environment should we run deploy for?
+ options:
+ - development
+ - backup
+ - ky
+ - es
+ - nl
+ - rh
+ - za
+ - gd
+ - rb
+ - ko
+ - ab
+ - rjm
+ - dk
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ env:
+ CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
+ CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
+ steps:
+ - name: Deploy to cloud.gov sandbox
+ uses: cloud-gov/cg-cli-tools@main
+ with:
+ cf_username: ${{ secrets[env.CF_USERNAME] }}
+ cf_password: ${{ secrets[env.CF_PASSWORD] }}
+ cf_org: cisa-dotgov
+ cf_space: ${{ env.ENVIRONMENT }}
+ cf_command: "cf push -f ops/manifests/manifest-${{ env.ENVIRONMENT }}.yaml --strategy rolling"
\ No newline at end of file
diff --git a/ops/manifests/manifest-ab.yaml b/ops/manifests/manifest-ab.yaml
index 3ca800392..a78de338e 100644
--- a/ops/manifests/manifest-ab.yaml
+++ b/ops/manifests/manifest-ab.yaml
@@ -4,7 +4,7 @@ applications:
buildpacks:
- python_buildpack
path: ../../src
- instances: 1
+ instances: 2
memory: 512M
stack: cflinuxfs4
timeout: 180
From 5114ef4ccd7e47eff024aab6562a26653f6c64de Mon Sep 17 00:00:00 2001
From: Alysia Broddrick
Date: Thu, 7 Mar 2024 16:18:41 -0800
Subject: [PATCH 20/29] fixed typo
---
.github/workflows/test-deploy.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/test-deploy.yaml b/.github/workflows/test-deploy.yaml
index 1c6cc95fc..1f3992280 100644
--- a/.github/workflows/test-deploy.yaml
+++ b/.github/workflows/test-deploy.yaml
@@ -38,4 +38,4 @@ jobs:
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: cisa-dotgov
cf_space: ${{ env.ENVIRONMENT }}
- cf_command: "cf push -f ops/manifests/manifest-${{ env.ENVIRONMENT }}.yaml --strategy rolling"
\ No newline at end of file
+ cf_command: "push -f ops/manifests/manifest-${{ env.ENVIRONMENT }}.yaml --strategy rolling"
\ No newline at end of file
From d52c254c15e0430323389d1bdd74492fcb806677 Mon Sep 17 00:00:00 2001
From: Alysia Broddrick
Date: Thu, 7 Mar 2024 16:33:41 -0800
Subject: [PATCH 21/29] updated workflow
---
.github/workflows/test-deploy.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/test-deploy.yaml b/.github/workflows/test-deploy.yaml
index 1f3992280..310a5ba0a 100644
--- a/.github/workflows/test-deploy.yaml
+++ b/.github/workflows/test-deploy.yaml
@@ -28,6 +28,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
env:
+ ENVIRONMENT: ${{ needs.variables.outputs.environment }}
CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
steps:
From 7d891f0d991ef9c9b07422f5a9b443a0dda351c6 Mon Sep 17 00:00:00 2001
From: Alysia Broddrick
Date: Thu, 7 Mar 2024 16:45:12 -0800
Subject: [PATCH 22/29] added env
---
.github/workflows/test-deploy.yaml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/test-deploy.yaml b/.github/workflows/test-deploy.yaml
index 310a5ba0a..af429738f 100644
--- a/.github/workflows/test-deploy.yaml
+++ b/.github/workflows/test-deploy.yaml
@@ -28,7 +28,6 @@ jobs:
deploy:
runs-on: ubuntu-latest
env:
- ENVIRONMENT: ${{ needs.variables.outputs.environment }}
CF_USERNAME: CF_${{ github.event.inputs.environment }}_USERNAME
CF_PASSWORD: CF_${{ github.event.inputs.environment }}_PASSWORD
steps:
@@ -38,5 +37,5 @@ jobs:
cf_username: ${{ secrets[env.CF_USERNAME] }}
cf_password: ${{ secrets[env.CF_PASSWORD] }}
cf_org: cisa-dotgov
- cf_space: ${{ env.ENVIRONMENT }}
- cf_command: "push -f ops/manifests/manifest-${{ env.ENVIRONMENT }}.yaml --strategy rolling"
\ No newline at end of file
+ cf_space: ${{ github.event.inputs.environment }}
+ cf_command: "push -f ops/manifests/manifest-${{ github.event.inputs.environment }}.yaml --strategy rolling"
\ No newline at end of file
From d189fffa840451c924889ce4acb2da01869da195 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Fri, 8 Mar 2024 14:36:46 -0700
Subject: [PATCH 23/29] Add create group
---
.../migrations/0074_create_groups_v08.py | 37 +++++++++++++++++++
.../views/utility/permission_views.py | 4 +-
2 files changed, 39 insertions(+), 2 deletions(-)
create mode 100644 src/registrar/migrations/0074_create_groups_v08.py
diff --git a/src/registrar/migrations/0074_create_groups_v08.py b/src/registrar/migrations/0074_create_groups_v08.py
new file mode 100644
index 000000000..0c28cee52
--- /dev/null
+++ b/src/registrar/migrations/0074_create_groups_v08.py
@@ -0,0 +1,37 @@
+# This migration creates the create_full_access_group and create_cisa_analyst_group groups
+# It is dependent on 0035 (which populates ContentType and Permissions)
+# If permissions on the groups need changing, edit CISA_ANALYST_GROUP_PERMISSIONS
+# in the user_group model then:
+# [NOT RECOMMENDED]
+# step 1: docker-compose exec app ./manage.py migrate --fake registrar 0035_contenttypes_permissions
+# step 2: docker-compose exec app ./manage.py migrate registrar 0036_create_groups
+# step 3: fake run the latest migration in the migrations list
+# [RECOMMENDED]
+# Alternatively:
+# step 1: duplicate the migration that loads data
+# step 2: docker-compose exec app ./manage.py migrate
+
+from django.db import migrations
+from registrar.models import UserGroup
+from typing import Any
+
+
+# For linting: RunPython expects a function reference,
+# so let's give it one
+def create_groups(apps, schema_editor) -> Any:
+ UserGroup.create_cisa_analyst_group(apps, schema_editor)
+ UserGroup.create_full_access_group(apps, schema_editor)
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("registrar", "0073_domainrequest_and_more"),
+ ]
+
+ operations = [
+ migrations.RunPython(
+ create_groups,
+ reverse_code=migrations.RunPython.noop,
+ atomic=True,
+ ),
+ ]
diff --git a/src/registrar/views/utility/permission_views.py b/src/registrar/views/utility/permission_views.py
index f2752c3b5..a30962e8f 100644
--- a/src/registrar/views/utility/permission_views.py
+++ b/src/registrar/views/utility/permission_views.py
@@ -66,7 +66,7 @@ class DomainRequestPermissionView(DomainRequestPermission, DetailView, abc.ABC):
# DetailView property for what model this is viewing
model = DomainRequest
# variable name in template context for the model object
- context_object_name = "DomainRequest"
+ context_object_name = "domainrequest"
# Abstract property enforces NotImplementedError on an attribute.
@property
@@ -85,7 +85,7 @@ class DomainRequestPermissionWithdrawView(DomainRequestPermissionWithdraw, Detai
# DetailView property for what model this is viewing
model = DomainRequest
# variable name in template context for the model object
- context_object_name = "DomainRequest"
+ context_object_name = "domainrequest"
# Abstract property enforces NotImplementedError on an attribute.
@property
From 9628c42dd61900493991f3a3bb4d54206965d736 Mon Sep 17 00:00:00 2001
From: zandercymatics <141044360+zandercymatics@users.noreply.github.com>
Date: Fri, 8 Mar 2024 14:41:21 -0700
Subject: [PATCH 24/29] reversion
---
src/registrar/views/utility/permission_views.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/registrar/views/utility/permission_views.py b/src/registrar/views/utility/permission_views.py
index a30962e8f..f2752c3b5 100644
--- a/src/registrar/views/utility/permission_views.py
+++ b/src/registrar/views/utility/permission_views.py
@@ -66,7 +66,7 @@ class DomainRequestPermissionView(DomainRequestPermission, DetailView, abc.ABC):
# DetailView property for what model this is viewing
model = DomainRequest
# variable name in template context for the model object
- context_object_name = "domainrequest"
+ context_object_name = "DomainRequest"
# Abstract property enforces NotImplementedError on an attribute.
@property
@@ -85,7 +85,7 @@ class DomainRequestPermissionWithdrawView(DomainRequestPermissionWithdraw, Detai
# DetailView property for what model this is viewing
model = DomainRequest
# variable name in template context for the model object
- context_object_name = "domainrequest"
+ context_object_name = "DomainRequest"
# Abstract property enforces NotImplementedError on an attribute.
@property
From a4822a069ec03951f58f86cf5b97d911026285fc Mon Sep 17 00:00:00 2001
From: Katherine-Osos <119689946+Katherine-Osos@users.noreply.github.com>
Date: Mon, 11 Mar 2024 12:26:05 -0500
Subject: [PATCH 25/29] Update language around processing time
---
src/registrar/templates/domain_request_done.html | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/registrar/templates/domain_request_done.html b/src/registrar/templates/domain_request_done.html
index 6d7bf6f43..f45b507c3 100644
--- a/src/registrar/templates/domain_request_done.html
+++ b/src/registrar/templates/domain_request_done.html
@@ -19,15 +19,16 @@
Next steps in this process
-
We’ll review your request. This usually takes 20 business days. During
- this review we’ll verify that:
+
We’ll review your request. This review period can take 30 business days. Due to the volume of requests, the wait time is longer than usual. We appreciate your patience.
+
+
During our review we’ll verify that:
Your organization is eligible for a .gov domain.
You work at the organization and/or can make requests on its behalf.
Your requested domain meets our naming requirements.
-
We’ll email you if we have questions and when we complete our review. You can check the status
+
We’ll email you if we have questions. We’ll also email you as soon as we complete our review. You can check the status
of your request at any time on the registrar homepage.