def employee_deactivated_list(request, format=None):
"""
Returns the full employee deactivated list
---
serializer: employees.serializers.EmployeeListSerializer
responseMessages:
- code: 401
message: Unauthorized. Authentication credentials were not provided. Invalid token.
- code: 403
message: Forbidden.
- code: 404
message: Not found
"""
if request.method == 'GET':
employee_list = get_list_or_404(Employee, is_active=False)
paginator = PageNumberPagination()
results = paginator.paginate_queryset(employee_list, request)
serializer = EmployeeListSerializer(results, many=True)
return paginator.get_paginated_response(serializer.data)
评论列表
文章目录