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"}), name="tournament_page"),
    path("", TournamentViewSet.as_view({"post": "create"}), name="tournament_page"),
    re_path(r"search/(?P<state>\w*)", TournamentViewSet.as_view({"get": "list", }), name="tournaments"),
]