ft_transcendence/tournament/urls.py

11 lines
456 B
Python
Raw Permalink Normal View History

from django.urls import path, re_path
2023-12-20 13:15:47 -05:00
from django.conf import settings
from django.conf.urls.static import static
from .viewset import TournamentViewSet
2023-12-20 13:15:47 -05:00
urlpatterns = [
2023-12-20 15:57:16 -05:00
path("<int:pk>", TournamentViewSet.as_view({"get": "retrieve"}), name="tournament_page"),
2023-12-20 16:49:18 -05:00
path("", TournamentViewSet.as_view({"post": "create"}), name="tournament_page"),
re_path(r"search/(?P<state>\w*)", TournamentViewSet.as_view({"get": "list", }), name="tournaments"),
2023-12-20 13:15:47 -05:00
]