2022-12-31 13:18:27 +00:00
|
|
|
from django.urls import path
|
|
|
|
|
2023-01-20 13:37:46 +00:00
|
|
|
from games import views
|
2022-12-31 13:18:27 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2023-02-18 19:50:36 +00:00
|
|
|
path("", views.index, name="index"),
|
2024-06-03 16:18:58 +00:00
|
|
|
path("device/add", views.add_device, name="add_device"),
|
|
|
|
path("edition/add", views.add_edition, name="add_edition"),
|
2023-02-18 19:50:36 +00:00
|
|
|
path(
|
2024-06-03 16:18:58 +00:00
|
|
|
"edition/add/for-game/<int:game_id>",
|
|
|
|
views.add_edition,
|
|
|
|
name="add_edition_for_game",
|
2023-02-18 19:50:36 +00:00
|
|
|
),
|
2024-06-03 16:18:58 +00:00
|
|
|
path("edition/<int:edition_id>/edit", views.edit_edition, name="edit_edition"),
|
2024-06-03 16:04:49 +00:00
|
|
|
path("game/add", views.add_game, name="add_game"),
|
2024-06-03 16:18:58 +00:00
|
|
|
path("game/<int:game_id>/edit", views.edit_game, name="edit_game"),
|
|
|
|
path("game/<int:game_id>/view", views.view_game, name="view_game"),
|
2024-06-03 16:04:49 +00:00
|
|
|
path("platform/add", views.add_platform, name="add_platform"),
|
2024-06-03 16:18:58 +00:00
|
|
|
path("platform/<int:platform_id>/edit", views.edit_platform, name="edit_platform"),
|
|
|
|
path("purchase/add", views.add_purchase, name="add_purchase"),
|
|
|
|
path("purchase/<int:purchase_id>/edit", views.edit_purchase, name="edit_purchase"),
|
|
|
|
path(
|
|
|
|
"purchase/<int:purchase_id>/delete",
|
|
|
|
views.delete_purchase,
|
|
|
|
name="delete_purchase",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"purchase/related-purchase-by-edition",
|
|
|
|
views.related_purchase_by_edition,
|
|
|
|
name="related_purchase_by_edition",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"purchase/add/for-edition/<int:edition_id>",
|
|
|
|
views.add_purchase,
|
|
|
|
name="add_purchase_for_edition",
|
|
|
|
),
|
|
|
|
path("session/add", views.add_session, name="add_session"),
|
2023-11-09 20:01:01 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/add/for-purchase/<int:purchase_id>",
|
2023-11-09 20:01:01 +00:00
|
|
|
views.add_session,
|
|
|
|
name="add_session_for_purchase",
|
|
|
|
),
|
2023-01-04 18:19:49 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/add/from-game/<int:session_id>",
|
2024-01-14 20:27:14 +00:00
|
|
|
views.new_session_from_existing_session,
|
|
|
|
{"template": "view_game.html#session-info"},
|
|
|
|
name="view_game_start_session_from_session",
|
2023-01-04 18:19:49 +00:00
|
|
|
),
|
2023-01-13 15:54:24 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/add/from-list/<int:session_id>",
|
2024-01-14 20:27:14 +00:00
|
|
|
views.new_session_from_existing_session,
|
|
|
|
{"template": "list_sessions.html#session-row"},
|
|
|
|
name="list_sessions_start_session_from_session",
|
2023-10-13 17:22:43 +00:00
|
|
|
),
|
2024-06-03 16:18:58 +00:00
|
|
|
path("session/<int:session_id>/edit", views.edit_session, name="edit_session"),
|
|
|
|
path(
|
|
|
|
"session/<int:session_id>/delete",
|
|
|
|
views.delete_session,
|
|
|
|
name="delete_session",
|
|
|
|
),
|
2023-10-13 17:22:43 +00:00
|
|
|
path(
|
2024-01-14 20:27:14 +00:00
|
|
|
"session/end/from-game/<int:session_id>",
|
|
|
|
views.end_session,
|
|
|
|
{"template": "view_game.html#session-info"},
|
|
|
|
name="view_game_end_session",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"session/end/from-list/<int:session_id>",
|
|
|
|
views.end_session,
|
|
|
|
{"template": "list_sessions.html#session-row"},
|
|
|
|
name="list_sessions_end_session",
|
2023-01-13 15:54:24 +00:00
|
|
|
),
|
2024-06-03 16:18:58 +00:00
|
|
|
path("session/list", views.list_sessions, name="list_sessions"),
|
2024-06-03 16:07:10 +00:00
|
|
|
path(
|
2024-06-03 16:18:58 +00:00
|
|
|
"session/list/recent",
|
|
|
|
views.list_sessions,
|
|
|
|
{"filter": "recent"},
|
|
|
|
name="list_sessions_recent",
|
2023-11-09 20:01:01 +00:00
|
|
|
),
|
2023-01-03 18:03:30 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/list/by-purchase/<int:purchase_id>",
|
2023-01-03 18:03:30 +00:00
|
|
|
views.list_sessions,
|
2023-01-15 22:14:28 +00:00
|
|
|
{"filter": "purchase"},
|
|
|
|
name="list_sessions_by_purchase",
|
|
|
|
),
|
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/list/by-platform/<int:platform_id>",
|
2023-01-15 22:14:28 +00:00
|
|
|
views.list_sessions,
|
|
|
|
{"filter": "platform"},
|
|
|
|
name="list_sessions_by_platform",
|
|
|
|
),
|
2023-02-19 13:30:26 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/list/by-game/<int:game_id>",
|
2023-02-19 13:30:26 +00:00
|
|
|
views.list_sessions,
|
|
|
|
{"filter": "game"},
|
|
|
|
name="list_sessions_by_game",
|
|
|
|
),
|
2023-01-15 22:14:28 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/list/by-edition/<int:edition_id>",
|
2023-01-15 22:14:28 +00:00
|
|
|
views.list_sessions,
|
2023-02-18 19:49:46 +00:00
|
|
|
{"filter": "edition"},
|
|
|
|
name="list_sessions_by_edition",
|
2023-01-03 18:03:30 +00:00
|
|
|
),
|
2023-02-19 13:30:26 +00:00
|
|
|
path(
|
2024-06-03 16:04:49 +00:00
|
|
|
"session/list/by-ownership/<str:ownership_type>",
|
2023-02-19 13:30:26 +00:00
|
|
|
views.list_sessions,
|
|
|
|
{"filter": "ownership_type"},
|
|
|
|
name="list_sessions_by_ownership_type",
|
|
|
|
),
|
2023-11-02 08:20:09 +00:00
|
|
|
path("stats/", views.stats, name="stats_current_year"),
|
2023-11-01 19:18:39 +00:00
|
|
|
path(
|
|
|
|
"stats/<int:year>",
|
|
|
|
views.stats,
|
|
|
|
name="stats_by_year",
|
|
|
|
),
|
2022-12-31 13:18:27 +00:00
|
|
|
]
|