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("", TournamentViewSet.as_view({"get": "retrieve", "post": "create"}), name="tournament_page"), re_path(r"()?", TournamentViewSet.as_view({"get": "list"}), name="tournaments"), ]