feat: complete realtime challenge matchmaking

This commit is contained in:
2026-08-09 03:07:38 +08:00
parent b6fc2431ca
commit 821311f4ad
11 changed files with 767 additions and 31 deletions
+11 -1
View File
@@ -3,8 +3,11 @@ from django.urls import path
from .views import (
AttemptStartView,
AttemptSubmitView,
ChallengeCreateView,
ChallengeJoinView,
ContestListView,
LeaderboardView,
MatchCancelView,
MatchmakingView,
MatchStateView,
MathGameCatalogView,
@@ -16,11 +19,18 @@ from .views import (
urlpatterns = [
path("", ContestListView.as_view(), name="contest-list"),
path("challenges/join/", ChallengeJoinView.as_view(), name="challenge-join"),
path("matches/<uuid:match_id>/", MatchStateView.as_view(), name="match-state"),
path("matches/<uuid:match_id>/cancel/", MatchCancelView.as_view(), name="match-cancel"),
path("<slug:slug>/start/", AttemptStartView.as_view(), name="attempt-start"),
path("<slug:slug>/matchmaking/", MatchmakingView.as_view(), name="matchmaking"),
path(
"<slug:slug>/challenges/",
ChallengeCreateView.as_view(),
name="challenge-create",
),
path("<slug:slug>/leaderboard/", LeaderboardView.as_view(), name="leaderboard"),
path("attempts/<uuid:attempt_id>/submit/", AttemptSubmitView.as_view(), name="attempt-submit"),
path("matches/<uuid:match_id>/", MatchStateView.as_view(), name="match-state"),
path("games/", MathGameCatalogView.as_view(), name="math-game-catalog"),
path("games/history/", MathGameHistoryView.as_view(), name="math-game-history"),
path("games/<str:kind>/start/", MathGameStartView.as_view(), name="math-game-start"),