Reworked the functions of events views for ViewSet

This commit is contained in:
Тимур
2024-04-02 13:01:39 +03:00
parent 96077981a2
commit 13b5bc679c
3 changed files with 11 additions and 6 deletions
+6 -3
View File
@@ -1,9 +1,12 @@
from django.urls import path
from django.urls import include, path
from rest_framework import routers
from api.events.views import CreateEventView
from api.events.views import EventViewSet
app_name = "events"
router = routers.DefaultRouter()
router.register("", EventViewSet)
urlpatterns = [
path("create/", CreateEventView.as_view(), name="create"),
path("", include(router.urls)),
]