Unify url path names

This commit is contained in:
Lukáš Kucharczyk 2024-06-03 18:04:49 +02:00
parent dc1a9d5c4f
commit 880ea93424
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 23 additions and 23 deletions

View File

@ -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/<int:purchase_id>",
"session/add/for-purchase/<int:purchase_id>",
views.add_session,
name="add_session_for_purchase",
),
path(
"session/clone/from-game/<int:session_id>",
"session/add/from-game/<int:session_id>",
views.new_session_from_existing_session,
{"template": "view_game.html#session-info"},
name="view_game_start_session_from_session",
),
path(
"session/clone/from-list/<int:session_id>",
"session/add/from-list/<int:session_id>",
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/<int:session_id>",
# "session/<int:session_id>/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/<int:edition_id>",
"purchase/add/for-edition/<int:edition_id>",
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/<int:game_id>",
"edition/add/for-game/<int:game_id>",
views.add_edition,
name="add_edition_for_game",
),
path("edit-edition/<int:edition_id>", views.edit_edition, name="edit_edition"),
path("edition/<int:edition_id>/edit", views.edit_edition, name="edit_edition"),
path("game/<int:game_id>/view", views.view_game, name="view_game"),
path("game/<int:game_id>/edit", views.edit_game, name="edit_game"),
path("edit-platform/<int:platform_id>", views.edit_platform, name="edit_platform"),
path("add-device/", views.add_device, name="add_device"),
path("edit-session/<int:session_id>", views.edit_session, name="edit_session"),
path("edit-purchase/<int:purchase_id>", views.edit_purchase, name="edit_purchase"),
path("list-sessions/", views.list_sessions, name="list_sessions"),
path("platform/<int:platform_id>/edit", views.edit_platform, name="edit_platform"),
path("device/add", views.add_device, name="add_device"),
path("session/<int:session_id>/edit", views.edit_session, name="edit_session"),
path("purchase/<int:purchase_id>/edit", views.edit_purchase, name="edit_purchase"),
path("session/list", views.list_sessions, name="list_sessions"),
path(
"list-sessions/by-purchase/<int:purchase_id>",
"session/list/by-purchase/<int:purchase_id>",
views.list_sessions,
{"filter": "purchase"},
name="list_sessions_by_purchase",
),
path(
"list-sessions/by-platform/<int:platform_id>",
"session/list/by-platform/<int:platform_id>",
views.list_sessions,
{"filter": "platform"},
name="list_sessions_by_platform",
),
path(
"list-sessions/by-game/<int:game_id>",
"session/list/by-game/<int:game_id>",
views.list_sessions,
{"filter": "game"},
name="list_sessions_by_game",
),
path(
"list-sessions/by-edition/<int:edition_id>",
"session/list/by-edition/<int:edition_id>",
views.list_sessions,
{"filter": "edition"},
name="list_sessions_by_edition",
),
path(
"list-sessions/by-ownership/<str:ownership_type>",
"session/list/by-ownership/<str:ownership_type>",
views.list_sessions,
{"filter": "ownership_type"},
name="list_sessions_by_ownership_type",