From 880ea934246346a7253196bda7352eb7570ffbf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 3 Jun 2024 18:04:49 +0200 Subject: [PATCH] Unify url path names --- games/urls.py | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/games/urls.py b/games/urls.py index 846c10d..93b6e34 100644 --- a/games/urls.py +++ b/games/urls.py @@ -5,27 +5,27 @@ from games import views urlpatterns = [ path("", views.index, name="index"), path( - "list-sessions/recent", + "session/list/recent", views.list_sessions, {"filter": "recent"}, name="list_sessions_recent", ), - path("add-game/", views.add_game, name="add_game"), - path("add-platform/", views.add_platform, name="add_platform"), - path("add-session/", views.add_session, name="add_session"), + path("game/add", views.add_game, name="add_game"), + path("platform/add", views.add_platform, name="add_platform"), + path("session/add", views.add_session, name="add_session"), path( - "add-session-for-purchase/", + "session/add/for-purchase/", views.add_session, name="add_session_for_purchase", ), path( - "session/clone/from-game/", + "session/add/from-game/", views.new_session_from_existing_session, {"template": "view_game.html#session-info"}, name="view_game_start_session_from_session", ), path( - "session/clone/from-list/", + "session/add/from-list/", views.new_session_from_existing_session, {"template": "list_sessions.html#session-row"}, name="list_sessions_start_session_from_session", @@ -43,7 +43,7 @@ urlpatterns = [ name="list_sessions_end_session", ), # path( - # "delete_session/by-id/", + # "session//delete", # views.delete_session, # name="delete_session", # ), @@ -52,9 +52,9 @@ urlpatterns = [ views.delete_purchase, name="delete_purchase", ), - path("add-purchase/", views.add_purchase, name="add_purchase"), + path("purchase/add", views.add_purchase, name="add_purchase"), path( - "add-purchase-for-edition/", + "purchase/add/for-edition/", views.add_purchase, name="add_purchase_for_edition", ), @@ -63,46 +63,46 @@ urlpatterns = [ views.related_purchase_by_edition, name="related_purchase_by_edition", ), - path("add-edition/", views.add_edition, name="add_edition"), + path("edition/add", views.add_edition, name="add_edition"), path( - "add-edition-for-game/", + "edition/add/for-game/", views.add_edition, name="add_edition_for_game", ), - path("edit-edition/", views.edit_edition, name="edit_edition"), + path("edition//edit", views.edit_edition, name="edit_edition"), path("game//view", views.view_game, name="view_game"), path("game//edit", views.edit_game, name="edit_game"), - path("edit-platform/", views.edit_platform, name="edit_platform"), - path("add-device/", views.add_device, name="add_device"), - path("edit-session/", views.edit_session, name="edit_session"), - path("edit-purchase/", views.edit_purchase, name="edit_purchase"), - path("list-sessions/", views.list_sessions, name="list_sessions"), + path("platform//edit", views.edit_platform, name="edit_platform"), + path("device/add", views.add_device, name="add_device"), + path("session//edit", views.edit_session, name="edit_session"), + path("purchase//edit", views.edit_purchase, name="edit_purchase"), + path("session/list", views.list_sessions, name="list_sessions"), path( - "list-sessions/by-purchase/", + "session/list/by-purchase/", views.list_sessions, {"filter": "purchase"}, name="list_sessions_by_purchase", ), path( - "list-sessions/by-platform/", + "session/list/by-platform/", views.list_sessions, {"filter": "platform"}, name="list_sessions_by_platform", ), path( - "list-sessions/by-game/", + "session/list/by-game/", views.list_sessions, {"filter": "game"}, name="list_sessions_by_game", ), path( - "list-sessions/by-edition/", + "session/list/by-edition/", views.list_sessions, {"filter": "edition"}, name="list_sessions_by_edition", ), path( - "list-sessions/by-ownership/", + "session/list/by-ownership/", views.list_sessions, {"filter": "ownership_type"}, name="list_sessions_by_ownership_type",