mirror of
https://github.com/more-tech4-magnum-opus/backend.git
synced 2025-07-11 08:32:20 +03:00
added event crud
This commit is contained in:
parent
d27124e807
commit
7ba849cd29
|
@ -1,8 +1,8 @@
|
||||||
from django.urls import path, include
|
from django.urls import path, include
|
||||||
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
|
||||||
|
|
||||||
|
from events.api.views import ListCreateEventApi, RetireUpdateDeleteEventApi
|
||||||
from marketplace.api.views import ListCreateProductApi, RetireUpdateDestroyProductApi
|
from marketplace.api.views import ListCreateProductApi, RetireUpdateDestroyProductApi
|
||||||
from users.api.views import ListCreateUserApi, CreateSeasonApi
|
|
||||||
from users.api.views import (
|
from users.api.views import (
|
||||||
ListCreateUserApi,
|
ListCreateUserApi,
|
||||||
RetireUpdateDeleteUserApi,
|
RetireUpdateDeleteUserApi,
|
||||||
|
@ -12,6 +12,7 @@ from users.api.views import (
|
||||||
RetireUpdateDeleteStreamApi,
|
RetireUpdateDeleteStreamApi,
|
||||||
ListCreateCommandApi,
|
ListCreateCommandApi,
|
||||||
RetireUpdateDeleteCommandApi,
|
RetireUpdateDeleteCommandApi,
|
||||||
|
CreateSeasonApi,
|
||||||
)
|
)
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
|
@ -103,11 +104,7 @@ urlpatterns = [
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
'create_season/',
|
"create_season/",
|
||||||
include(
|
include([path("", CreateSeasonApi.as_view(), name="create new season")]),
|
||||||
[
|
),
|
||||||
path("", CreateSeasonApi.as_view(), name='create new season')
|
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
|
|
|
@ -24,6 +24,7 @@ class CreateSeasonApi(generics.CreateAPIView):
|
||||||
serializer_class = CreateSeasonSerializer
|
serializer_class = CreateSeasonSerializer
|
||||||
# permission_classes = [IsAuthenticated, IsAdmin]
|
# permission_classes = [IsAuthenticated, IsAdmin]
|
||||||
|
|
||||||
|
|
||||||
class RetireUpdateDeleteUserApi(generics.RetrieveUpdateDestroyAPIView):
|
class RetireUpdateDeleteUserApi(generics.RetrieveUpdateDestroyAPIView):
|
||||||
def get_object(self):
|
def get_object(self):
|
||||||
user = get_object_or_404(
|
user = get_object_or_404(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user