Enable basic routing of /users

This commit is contained in:
2020-01-06 22:36:12 +00:00
parent 969d2aa57c
commit 095003b943
3 changed files with 22 additions and 18 deletions
+7 -2
View File
@@ -1,3 +1,8 @@
from django.shortcuts import render
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
# Create your views here.
from . import models, serializers
class UserViewSet(viewsets.ModelViewSet):
queryset = User.objects.all().order_by('-date_joined')
serializer_class = serializers.UserSerializer