from core.serializers import UserSerializer | |
from rest_framework import generics | |
from core.models import User | |
class UserList(generics.ListCreateAPIView): | |
queryset = User.objects.all() | |
serializer_class = UserSerializer | |
class UserDetail(generics.RetrieveUpdateDestroyAPIView): | |
queryset = User.objects.all() | |
serializer_class = UserSerializer |