<reponame>SanyaDeath/liis-ngng-booking
from rest_framework.viewsets import ModelViewSet

from users.models import User

from .permissions import AdminPermission
from .serializers import UserSerializer


class UserViewSet(ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer
    permission_classes = [AdminPermission]
    lookup_field = 'username'

from rest_framework.viewsets import ModelViewSet

from users.models import User

from .permissions import AdminPermission
from .serializers import UserSerializer


class UserViewSet(ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer
    permission_classes = [AdminPermission]
    lookup_field = 'username'