diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py index 7f711d6a2..7d4439636 100644 --- a/src/registrar/config/urls.py +++ b/src/registrar/config/urls.py @@ -13,7 +13,9 @@ from registrar.views import health, index, profile, whoami from registrar.forms import ApplicationWizard APPLICATION_URL_NAME = "application_step" -application_wizard = ApplicationWizard.as_view(url_name=APPLICATION_URL_NAME, done_step_name="finished") +application_wizard = ApplicationWizard.as_view( + url_name=APPLICATION_URL_NAME, done_step_name="finished" +) urlpatterns = [ path("", index.index, name="home"), @@ -22,9 +24,8 @@ urlpatterns = [ path("health/", health.health), path("edit_profile/", profile.edit_profile, name="edit-profile"), path("openid/", include("djangooidc.urls")), - path('register/', application_wizard, name="application"), - re_path(r'^register/(?P.+)/$', application_wizard, name=APPLICATION_URL_NAME), - + path("register/", application_wizard, name="application"), + re_path(r"^register/(?P.+)/$", application_wizard, name=APPLICATION_URL_NAME), ] if not settings.DEBUG: diff --git a/src/registrar/forms/__init__.py b/src/registrar/forms/__init__.py index 11b58340b..e1dff5082 100644 --- a/src/registrar/forms/__init__.py +++ b/src/registrar/forms/__init__.py @@ -1,4 +1,3 @@ - from .edit_profile import EditProfileForm from .application_wizard import ApplicationWizard diff --git a/src/registrar/forms/application_wizard.py b/src/registrar/forms/application_wizard.py index 2929bd5a0..fe497f319 100644 --- a/src/registrar/forms/application_wizard.py +++ b/src/registrar/forms/application_wizard.py @@ -9,23 +9,28 @@ from formtools.wizard.views import NamedUrlSessionWizardView logger = logging.getLogger(__name__) + class RequirementsForm(forms.Form): template_name = "application_requirements.html" agree_box = forms.BooleanField() + class OrganizationForm(forms.Form): template_name = "application_organization.html" organization_type = forms.ChoiceField(widget=forms.RadioSelect) + # List of forms in our wizard. Each entry is a tuple of a name and a form # subclass -FORMS = [("requirements",RequirementsForm), ("organization",OrganizationForm)] +FORMS = [("requirements", RequirementsForm), ("organization", OrganizationForm)] # Dict to match up the right template with the right step. Keys here must # match the first elements of the tuples above -TEMPLATES = {"requirements": "application_requirements.html", - "organization": "application_organization.html" - } +TEMPLATES = { + "requirements": "application_requirements.html", + "organization": "application_organization.html", +} + class ApplicationWizard(NamedUrlSessionWizardView): form_list = FORMS