ft_transcendence/tournament/urls.py

10 lines
380 B
Python

from django.urls import path, re_path
from django.conf import settings
from django.conf.urls.static import static
from .viewset import TournamentViewSet
urlpatterns = [
path("<int:pk>", TournamentViewSet.as_view({"get": "retrieve", "post": "create"}), name="tournament_page"),
re_path(r"(<str:state>)?", TournamentViewSet.as_view({"get": "list"}), name="tournaments"),
]