Skip to content

Commit

Permalink
cleanup urls a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
zandercymatics committed Nov 1, 2024
1 parent 42bf6ef commit 18e25b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/registrar/config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
DOMAIN_REQUEST_NAMESPACE = views.DomainRequestWizard.URL_NAMESPACE

# dynamically generate the other domain_request_urls
domain_request_urls = []
domain_request_urls = [
path("start/", views.DomainRequestWizard.as_view(), name="start"),
path("finished/", views.Finished.as_view(), name="finished"),
]
for step, view in [
# add/remove steps here
(Step.ORGANIZATION_TYPE, views.OrganizationType),
Expand All @@ -62,7 +65,7 @@
(PortfolioDomainRequestStep.REQUESTING_ENTITY, views.RequestingEntity),
(PortfolioDomainRequestStep.ADDITIONAL_DETAILS, views.PortfolioAdditionalDetails),
]:
domain_request_urls.append(path(f"{step}/", view.as_view(), name=step))
domain_request_urls.append(path(f"<int:id>/{step}/", view.as_view(), name=step))


urlpatterns = [
Expand Down Expand Up @@ -255,9 +258,7 @@
),
path("health", views.health, name="health"),
path("openid/", include("djangooidc.urls")),
path("request/start/", views.DomainRequestWizard.as_view(), name="start"),
path("request/finished/", views.Finished.as_view(), name="finished"),
path("request/<int:id>/", include((domain_request_urls, DOMAIN_REQUEST_NAMESPACE))),
path("request/", include((domain_request_urls, DOMAIN_REQUEST_NAMESPACE))),
path("api/v1/available/", available, name="available"),
path("api/v1/rdap/", rdap, name="rdap"),
path("api/v1/get-report/current-federal", get_current_federal, name="get-current-federal"),
Expand Down
2 changes: 1 addition & 1 deletion src/registrar/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<h1>Manage your domains</h1>

<p class="margin-top-4">
<a href="{% url 'start' %}" class="usa-button"
<a href="{% url 'domain-request:start' %}" class="usa-button"
>
Start a new domain request
</a>
Expand Down

0 comments on commit 18e25b0

Please sign in to comment.