2022-10-08 13:52:49 +03:00
|
|
|
from rest_framework import generics
|
|
|
|
from rest_framework.permissions import IsAuthenticated
|
|
|
|
|
|
|
|
from common.permissions import IsAdmin
|
2022-10-08 17:14:19 +03:00
|
|
|
from users.api.serializers import UserSerializer, CreateSeasonSerializer
|
2022-10-08 13:52:49 +03:00
|
|
|
from users.models import User
|
|
|
|
|
|
|
|
|
|
|
|
class ListCreateUserApi(generics.ListCreateAPIView):
|
|
|
|
serializer_class = UserSerializer
|
|
|
|
permission_classes = [IsAuthenticated, IsAdmin]
|
|
|
|
queryset = User.objects.all()
|
2022-10-08 17:14:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
class CreateSeasonApi(generics.CreateAPIView):
|
|
|
|
serializer_class = CreateSeasonSerializer
|
|
|
|
#permission_classes = [IsAuthenticated, IsAdmin]
|