<reponame>gallardowolfcode/test_django
from django.shortcuts import render
from rest_framework import viewsets
from .models import Employee, User, Request
from .serializers import EmployeeSerializer, UserSerializer, RequestSerializer

# Create your views here.
class UserViewset(viewsets.ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer

class EmployeeViewset(viewsets.ModelViewSet):
    queryset = Employee.objects.all()
    serializer_class = EmployeeSerializer

class RequestViewset(viewsets.ModelViewSet):
    queryset = Request.objects.all()
    serializer_class = RequestSerializer
from django.shortcuts import render
from rest_framework import viewsets
from .models import Employee, User, Request
from .serializers import EmployeeSerializer, UserSerializer, RequestSerializer

# Create your views here.
class UserViewset(viewsets.ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer

class EmployeeViewset(viewsets.ModelViewSet):
    queryset = Employee.objects.all()
    serializer_class = EmployeeSerializer

class RequestViewset(viewsets.ModelViewSet):
    queryset = Request.objects.all()
    serializer_class = RequestSerializer
# Create your views here.