17 lines
418 B
Python
17 lines
418 B
Python
|
|
from rest_framework import viewsets
|
||
|
|
from rest_framework import permissions
|
||
|
|
|
||
|
|
from django.contrib.auth import get_user_model
|
||
|
|
|
||
|
|
from .serializers import UserSerializer
|
||
|
|
|
||
|
|
User = get_user_model()
|
||
|
|
|
||
|
|
|
||
|
|
class UserViewSet(viewsets.ReadOnlyModelViewSet):
|
||
|
|
"""Read-only viewset exposing users for the POC."""
|
||
|
|
|
||
|
|
queryset = User.objects.all()
|
||
|
|
serializer_class = UserSerializer
|
||
|
|
permission_classes = [permissions.AllowAny]
|