change url patern to tournament

This commit is contained in:
starnakin 2023-12-20 21:57:16 +01:00
parent 56cfd563d7
commit 9523ac4554

View File

@ -5,6 +5,6 @@ from django.conf.urls.static import static
from .viewset import TournamentViewSet from .viewset import TournamentViewSet
urlpatterns = [ urlpatterns = [
path("<int:pk>", TournamentViewSet.as_view({"get": "retrieve", "post": "create"}), name="tournament_page"), path("<int:pk>", TournamentViewSet.as_view({"get": "retrieve"}), name="tournament_page"),
re_path(r"(<str:state>)?", TournamentViewSet.as_view({"get": "list"}), name="tournaments"), re_path(r"search/(?P<state>\w*)", TournamentViewSet.as_view({"get": "list", "post": "create"}), name="tournaments"),
] ]