Django backend for WorkX project
25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
- from rest_framework import viewsets
- from rest_framework.authentication import TokenAuthentication, SessionAuthentication
- from rest_framework.permissions import IsAuthenticated
- from .models import Employee
- from .serializers import EmployeeSerializer
-
-
- class EmployeeViewSet(viewsets.ReadOnlyModelViewSet):
- queryset = Employee.objects.all()
- serializer_class = EmployeeSerializer
- authentication_classes = [TokenAuthentication, SessionAuthentication]
- permission_classes = [IsAuthenticated]
|