diff --git a/storage_service/locations/urls.py b/storage_service/locations/urls.py index 588db43cd..5975758ab 100644 --- a/storage_service/locations/urls.py +++ b/storage_service/locations/urls.py @@ -1,26 +1,23 @@ from django.urls import path -from django.urls import re_path from locations import views -UUID = r"\w{8}-\w{4}-\w{4}-\w{4}-\w{12}" - app_name = "locations" urlpatterns = [ # Sorted by alphabetized categories # Locations path("locations/", views.location_list, name="location_list"), - re_path( - r"^locations/(?P" + UUID + ")/$", + path( + "locations/", views.location_detail, name="location_detail", ), - re_path( - r"^locations/(?P" + UUID + ")/delete/$", + path( + "locations//delete/", views.location_delete, name="location_delete", ), - re_path( - r"^locations/(?P" + UUID + ")/switch_enabled/$", + path( + "locations//switch_enabled/", views.location_switch_enabled, name="location_switch_enabled", ), @@ -32,13 +29,13 @@ views.package_delete_request, name="package_delete_request", ), - re_path( - r"^packages/(?P" + UUID + ")/delete/$", + path( + "packages//delete/", views.package_delete, name="package_delete", ), - re_path( - r"^packages/(?P" + UUID + ")/update_status/$", + path( + "packages//update_status/", views.package_update_status, name="package_update_status", ), @@ -47,14 +44,14 @@ views.aip_recover_request, name="aip_recover_request", ), - re_path( - r"^packages/(?P" + UUID + ")/reingest/$", + path( + "packages//reingest/", views.aip_reingest, name="aip_reingest", ), # Fixity check results - re_path( - r"^fixity/(?P" + UUID + ")/$", + path( + "fixity//", views.package_fixity, name="package_fixity", ), @@ -62,50 +59,42 @@ # Pipelines path("pipelines/", views.pipeline_list, name="pipeline_list"), path("pipelines/create/", views.pipeline_edit, name="pipeline_create"), - re_path( - r"^pipeline/(?P" + UUID + ")/edit/$", + path( + "pipeline//edit/", views.pipeline_edit, name="pipeline_edit", ), - re_path( - r"^pipeline/(?P" + UUID + ")/detail/$", + path( + "pipeline//detail/", views.pipeline_detail, name="pipeline_detail", ), - re_path( - r"^pipeline/(?P" + UUID + ")/delete/$", + path( + "pipeline//delete/", views.pipeline_delete, name="pipeline_delete", ), - re_path( - r"^pipeline/(?P" + UUID + ")/switch_enabled/$", + path( + "pipeline//switch_enabled/", views.pipeline_switch_enabled, name="pipeline_switch_enabled", ), # Spaces path("spaces/", views.space_list, name="space_list"), - re_path( - r"^spaces/(?P" + UUID + ")/$", views.space_detail, name="space_detail" - ), - re_path( - r"^spaces/(?P" + UUID + ")/edit/$", views.space_edit, name="space_edit" - ), - re_path( - r"^spaces/(?P" + UUID + ")/delete/$", + path("spaces//", views.space_detail, name="space_detail"), + path("spaces//edit/", views.space_edit, name="space_edit"), + path( + "spaces//delete/", views.space_delete, name="space_delete", ), - re_path( - r"^spaces/(?P" + UUID + ")/location_create/$", + path( + "spaces//location_create/", views.location_edit, name="location_create", ), - re_path( - r"^spaces/(?P" - + UUID - + ")/location/(?P" - + UUID - + ")/edit/$", + path( + "spaces//location//edit/", views.location_edit, name="location_edit", ), @@ -118,24 +107,24 @@ ), # Callbacks path("callbacks/", views.callback_list, name="callback_list"), - re_path( - r"^callbacks/(?P" + UUID + ")/$", + path( + "callbacks//", views.callback_detail, name="callback_detail", ), path("callbacks/create/", views.callback_edit, name="callback_create"), - re_path( - r"^callbacks/(?P" + UUID + ")/edit/$", + path( + "callbacks//edit/", views.callback_edit, name="callback_edit", ), - re_path( - r"^callbacks/(?P" + UUID + ")/delete/$", + path( + "callbacks//delete/", views.callback_delete, name="callback_delete", ), - re_path( - r"^callbacks/(?P" + UUID + ")/switch_enabled/$", + path( + "callbacks//switch_enabled/", views.callback_switch_enabled, name="callback_switch_enabled", ),