From 9523ac45542596a9b44fb165b4b58aecc2f078fa Mon Sep 17 00:00:00 2001 From: starnakin Date: Wed, 20 Dec 2023 21:57:16 +0100 Subject: [PATCH] change url patern to tournament --- tournament/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tournament/urls.py b/tournament/urls.py index f614391..47abf9b 100644 --- a/tournament/urls.py +++ b/tournament/urls.py @@ -5,6 +5,6 @@ from django.conf.urls.static import static from .viewset import TournamentViewSet urlpatterns = [ - path("", TournamentViewSet.as_view({"get": "retrieve", "post": "create"}), name="tournament_page"), - re_path(r"()?", TournamentViewSet.as_view({"get": "list"}), name="tournaments"), + path("", TournamentViewSet.as_view({"get": "retrieve"}), name="tournament_page"), + re_path(r"search/(?P\w*)", TournamentViewSet.as_view({"get": "list", "post": "create"}), name="tournaments"), ] \ No newline at end of file