mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-02 02:28:32 +02:00
Fix black formatting
This commit is contained in:
parent
5766a0bf9f
commit
fc448351da
3 changed files with 14 additions and 9 deletions
|
@ -13,7 +13,9 @@ from registrar.views import health, index, profile, whoami
|
||||||
from registrar.forms import ApplicationWizard
|
from registrar.forms import ApplicationWizard
|
||||||
|
|
||||||
APPLICATION_URL_NAME = "application_step"
|
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 = [
|
urlpatterns = [
|
||||||
path("", index.index, name="home"),
|
path("", index.index, name="home"),
|
||||||
|
@ -22,9 +24,8 @@ urlpatterns = [
|
||||||
path("health/", health.health),
|
path("health/", health.health),
|
||||||
path("edit_profile/", profile.edit_profile, name="edit-profile"),
|
path("edit_profile/", profile.edit_profile, name="edit-profile"),
|
||||||
path("openid/", include("djangooidc.urls")),
|
path("openid/", include("djangooidc.urls")),
|
||||||
path('register/', application_wizard, name="application"),
|
path("register/", application_wizard, name="application"),
|
||||||
re_path(r'^register/(?P<step>.+)/$', application_wizard, name=APPLICATION_URL_NAME),
|
re_path(r"^register/(?P<step>.+)/$", application_wizard, name=APPLICATION_URL_NAME),
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if not settings.DEBUG:
|
if not settings.DEBUG:
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
from .edit_profile import EditProfileForm
|
from .edit_profile import EditProfileForm
|
||||||
from .application_wizard import ApplicationWizard
|
from .application_wizard import ApplicationWizard
|
||||||
|
|
||||||
|
|
|
@ -9,23 +9,28 @@ from formtools.wizard.views import NamedUrlSessionWizardView
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class RequirementsForm(forms.Form):
|
class RequirementsForm(forms.Form):
|
||||||
template_name = "application_requirements.html"
|
template_name = "application_requirements.html"
|
||||||
agree_box = forms.BooleanField()
|
agree_box = forms.BooleanField()
|
||||||
|
|
||||||
|
|
||||||
class OrganizationForm(forms.Form):
|
class OrganizationForm(forms.Form):
|
||||||
template_name = "application_organization.html"
|
template_name = "application_organization.html"
|
||||||
organization_type = forms.ChoiceField(widget=forms.RadioSelect)
|
organization_type = forms.ChoiceField(widget=forms.RadioSelect)
|
||||||
|
|
||||||
|
|
||||||
# List of forms in our wizard. Each entry is a tuple of a name and a form
|
# List of forms in our wizard. Each entry is a tuple of a name and a form
|
||||||
# subclass
|
# 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
|
# Dict to match up the right template with the right step. Keys here must
|
||||||
# match the first elements of the tuples above
|
# match the first elements of the tuples above
|
||||||
TEMPLATES = {"requirements": "application_requirements.html",
|
TEMPLATES = {
|
||||||
"organization": "application_organization.html"
|
"requirements": "application_requirements.html",
|
||||||
}
|
"organization": "application_organization.html",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class ApplicationWizard(NamedUrlSessionWizardView):
|
class ApplicationWizard(NamedUrlSessionWizardView):
|
||||||
form_list = FORMS
|
form_list = FORMS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue