Enable basic routing of /users
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user