Ivy-Backend/ivy/accounts/views.py

13 lines
410 B
Python

from rest_framework import viewsets
from .serializers import UserSerializer
from django.contrib.auth.models import User
from rest_framework.permissions import IsAuthenticated
# Create your views here.
class UserListViewSet(viewsets.ModelViewSet):
permission_classes = [IsAuthenticated]
http_method_names = ['get']
serializer_class = UserSerializer
queryset = User.objects.all()