change deployment url to /deployments
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ from django.urls import path, include
|
||||
from deployment.views import index, create, details, deploy, abort
|
||||
|
||||
urlpatterns = [
|
||||
path("", index, name="deployment"),
|
||||
path("", index, name="deployments"),
|
||||
path("create", create, name="deployment-create"),
|
||||
path("<uuid:deployment_id>", details, name="deployment-details"),
|
||||
path("<uuid:deployment_id>/deploy", deploy, name="deployment-launch"),
|
||||
@@ -13,7 +13,7 @@ urlpatterns = [
|
||||
"events/<user_id>/",
|
||||
include(django_eventstream.urls),
|
||||
{"format-channels": ["deployment_{user_id}"]},
|
||||
name="deployment-events",
|
||||
name="deployments-events",
|
||||
),
|
||||
path(
|
||||
"events/<user_id>/<deployment_id>/",
|
||||
|
||||
+5
-5
@@ -71,9 +71,9 @@ def deploy(request, deployment_id):
|
||||
launch_deploy.delay(deployment_id)
|
||||
|
||||
if page := request.GET.get("page", ""):
|
||||
return HttpResponseRedirect(f"/deployment?page={page}")
|
||||
return HttpResponseRedirect(f"/deployments?page={page}")
|
||||
|
||||
return HttpResponseRedirect("/deployment")
|
||||
return HttpResponseRedirect("/deployments")
|
||||
|
||||
|
||||
def abort(request, deployment_id):
|
||||
@@ -95,7 +95,7 @@ def abort(request, deployment_id):
|
||||
Event.send_details(deployment, progress)
|
||||
Event.send(deployment)
|
||||
|
||||
return HttpResponseRedirect(f"/deployment/{deployment.id}")
|
||||
return HttpResponseRedirect(f"/deployments/{deployment.id}")
|
||||
|
||||
|
||||
def details(request, deployment_id):
|
||||
@@ -116,7 +116,7 @@ def details(request, deployment_id):
|
||||
deployment.delete()
|
||||
except Exception as e:
|
||||
return HttpResponseServerError(e)
|
||||
return HttpResponseRedirect("/deployment")
|
||||
return HttpResponseRedirect("/deployments")
|
||||
|
||||
return render(
|
||||
request,
|
||||
@@ -145,4 +145,4 @@ def create(request):
|
||||
except Exception as e:
|
||||
return HttpResponseServerError(e)
|
||||
|
||||
return HttpResponseRedirect("/deployment")
|
||||
return HttpResponseRedirect("/deployments")
|
||||
|
||||
Reference in New Issue
Block a user