core: recreation of tournament view by using
queryset
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
from django.urls import path
|
||||
from django.urls import path, re_path
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
|
||||
from .views import TournamentsView, TournamentView
|
||||
from .viewset import TournamentViewSet
|
||||
|
||||
urlpatterns = [
|
||||
path("<int:pk>", name="tournament_page"),
|
||||
path("", TournamentsView.as_view(), name="tournaments"),
|
||||
path("<int:pk>", TournamentViewSet.as_view({"get": "retrieve", "post": "create"}), name="tournament_page"),
|
||||
re_path(r"(<str:state>)?", TournamentViewSet.as_view({"get": "list"}), name="tournaments"),
|
||||
]
|
Reference in New Issue
Block a user