2022-12-31 13:18:27 +00:00
|
|
|
from django.urls import path
|
|
|
|
|
2024-08-12 19:52:26 +00:00
|
|
|
from games.views import device, edition, game, general, platform, purchase, session
|
2022-12-31 13:18:27 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2024-08-12 19:52:26 +00:00
|
|
|
path("", general.index, name="index"),
|
|
|
|
path("device/add", device.add_device, name="add_device"),
|
|
|
|
path("device/delete/<int:device_id>", device.delete_device, name="delete_device"),
|
|
|
|
path("device/edit/<int:device_id>", device.edit_device, name="edit_device"),
|
|
|
|
path("device/list", device.list_devices, name="list_devices"),
|
|
|
|
path("edition/add", edition.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>",
|
2024-08-12 19:52:26 +00:00
|
|
|
edition.add_edition,
|
2024-06-03 16:18:58 +00:00
|
|
|
name="add_edition_for_game",
|
2023-02-18 19:50:36 +00:00
|
|
|
),
|
2024-08-12 19:52:26 +00:00
|
|
|
path("edition/<int:edition_id>/edit", edition.edit_edition, name="edit_edition"),
|
|
|
|
path("edition/list", edition.list_editions, name="list_editions"),
|
2024-08-11 18:21:27 +00:00
|
|
|
path(
|
|
|
|
"edition/<int:edition_id>/delete",
|
2024-08-12 19:52:26 +00:00
|
|
|
edition.delete_edition,
|
2024-08-11 18:21:27 +00:00
|
|
|
name="delete_edition",
|
|
|
|
),
|
2024-08-12 19:52:26 +00:00
|
|
|
path("game/add", game.add_game, name="add_game"),
|
|
|
|
path("game/<int:game_id>/edit", game.edit_game, name="edit_game"),
|
|
|
|
path("game/<int:game_id>/view", game.view_game, name="view_game"),
|
|
|
|
path("game/<int:game_id>/delete", game.delete_game, name="delete_game"),
|
|
|
|
path("game/list", game.list_games, name="list_games"),
|
|
|
|
path("platform/add", platform.add_platform, name="add_platform"),
|
2024-08-12 19:42:34 +00:00
|
|
|
path(
|
|
|
|
"platform/<int:platform_id>/edit",
|
2024-08-12 19:52:26 +00:00
|
|
|
platform.edit_platform,
|
2024-08-12 19:42:34 +00:00
|
|
|
name="edit_platform",
|
|
|
|
),
|
2024-08-11 16:34:50 +00:00
|
|
|
path(
|
|
|
|
"platform/<int:platform_id>/delete",
|
2024-08-12 19:52:26 +00:00
|
|
|
platform.delete_platform,
|
2024-08-11 16:34:50 +00:00
|
|
|
name="delete_platform",
|
|
|
|
),
|
2024-08-12 19:52:26 +00:00
|
|
|
path("platform/list", platform.list_platforms, name="list_platforms"),
|
|
|
|
path("purchase/add", purchase.add_purchase, name="add_purchase"),
|
2024-08-12 19:42:34 +00:00
|
|
|
path(
|
|
|
|
"purchase/<int:purchase_id>/edit",
|
2024-08-12 19:52:26 +00:00
|
|
|
purchase.edit_purchase,
|
2024-08-12 19:42:34 +00:00
|
|
|
name="edit_purchase",
|
|
|
|
),
|
2024-09-10 12:46:50 +00:00
|
|
|
path(
|
|
|
|
"purchase/<int:purchase_id>/drop",
|
|
|
|
purchase.drop_purchase,
|
|
|
|
name="drop_purchase",
|
|
|
|
),
|
2024-06-03 16:18:58 +00:00
|
|
|
path(
|
|
|
|
"purchase/<int:purchase_id>/delete",
|
2024-08-12 19:52:26 +00:00
|
|
|
purchase.delete_purchase,
|
2024-06-03 16:18:58 +00:00
|
|
|
name="delete_purchase",
|
|
|
|
),
|
2024-09-10 13:04:18 +00:00
|
|
|
path(
|
|
|
|
"purchase/<int:purchase_id>/finish",
|
|
|
|
purchase.finish_purchase,
|
|
|
|
name="finish_purchase",
|
|
|
|
),
|
2024-08-08 18:17:43 +00:00
|
|
|
path(
|
|
|
|
"purchase/list",
|
2024-08-12 19:52:26 +00:00
|
|
|
purchase.list_purchases,
|
2024-08-08 18:17:43 +00:00
|
|
|
name="list_purchases",
|
|
|
|
),
|
2024-09-10 12:50:02 +00:00
|
|
|
path(
|
|
|
|
"purchase/<int:purchase_id>/refund",
|
|
|
|
purchase.refund_purchase,
|
|
|
|
name="refund_purchase",
|
|
|
|
),
|
2024-06-03 16:18:58 +00:00
|
|
|
path(
|
|
|
|
"purchase/related-purchase-by-edition",
|
2024-08-12 19:52:26 +00:00
|
|
|
purchase.related_purchase_by_edition,
|
2024-06-03 16:18:58 +00:00
|
|
|
name="related_purchase_by_edition",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"purchase/add/for-edition/<int:edition_id>",
|
2024-08-12 19:52:26 +00:00
|
|
|
purchase.add_purchase,
|
2024-06-03 16:18:58 +00:00
|
|
|
name="add_purchase_for_edition",
|
|
|
|
),
|
2024-08-12 19:52:26 +00:00
|
|
|
path("session/add", session.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>",
|
2024-08-12 19:52:26 +00:00
|
|
|
session.add_session,
|
2023-11-09 20:01:01 +00:00
|
|
|
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-08-12 19:52:26 +00:00
|
|
|
session.new_session_from_existing_session,
|
2024-01-14 20:27:14 +00:00
|
|
|
{"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-08-12 19:52:26 +00:00
|
|
|
session.new_session_from_existing_session,
|
2024-01-14 20:27:14 +00:00
|
|
|
{"template": "list_sessions.html#session-row"},
|
|
|
|
name="list_sessions_start_session_from_session",
|
2023-10-13 17:22:43 +00:00
|
|
|
),
|
2024-08-12 19:52:26 +00:00
|
|
|
path("session/<int:session_id>/edit", session.edit_session, name="edit_session"),
|
2024-06-03 16:18:58 +00:00
|
|
|
path(
|
|
|
|
"session/<int:session_id>/delete",
|
2024-08-12 19:52:26 +00:00
|
|
|
session.delete_session,
|
2024-06-03 16:18:58 +00:00
|
|
|
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>",
|
2024-08-12 19:52:26 +00:00
|
|
|
session.end_session,
|
2024-01-14 20:27:14 +00:00
|
|
|
{"template": "view_game.html#session-info"},
|
|
|
|
name="view_game_end_session",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"session/end/from-list/<int:session_id>",
|
2024-08-12 19:52:26 +00:00
|
|
|
session.end_session,
|
2024-01-14 20:27:14 +00:00
|
|
|
{"template": "list_sessions.html#session-row"},
|
|
|
|
name="list_sessions_end_session",
|
2023-01-13 15:54:24 +00:00
|
|
|
),
|
2024-08-12 19:52:26 +00:00
|
|
|
path("session/list", session.list_sessions, name="list_sessions"),
|
|
|
|
path("stats/", general.stats_alltime, name="stats_alltime"),
|
2023-11-01 19:18:39 +00:00
|
|
|
path(
|
|
|
|
"stats/<int:year>",
|
2024-08-12 19:52:26 +00:00
|
|
|
general.stats,
|
2023-11-01 19:18:39 +00:00
|
|
|
name="stats_by_year",
|
|
|
|
),
|
2022-12-31 13:18:27 +00:00
|
|
|
]
|