48 lines
1.7 KiB
Python
48 lines
1.7 KiB
Python
from django.urls import path
|
|
|
|
from .views import (
|
|
AttemptStartView,
|
|
AttemptSubmitView,
|
|
ChallengeCreateView,
|
|
ChallengeJoinView,
|
|
ContestListView,
|
|
LeaderboardView,
|
|
MatchCancelView,
|
|
MatchmakingView,
|
|
MatchStateView,
|
|
MathGameCatalogView,
|
|
MathGameHistoryView,
|
|
MathGameStartView,
|
|
MathGameSubmitView,
|
|
SudokuHintView,
|
|
)
|
|
|
|
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("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"),
|
|
path(
|
|
"games/attempts/<uuid:attempt_id>/submit/",
|
|
MathGameSubmitView.as_view(),
|
|
name="math-game-submit",
|
|
),
|
|
path(
|
|
"games/attempts/<uuid:attempt_id>/hint/",
|
|
SudokuHintView.as_view(),
|
|
name="sudoku-hint",
|
|
),
|
|
]
|