|
@@ -1,3 +1,14 @@
|
|
|
from django.shortcuts import render
|
|
|
|
|
|
# Create your views here.
|
|
|
+from rest_framework import status
|
|
|
+from rest_framework.response import Response
|
|
|
+from rest_framework.views import APIView
|
|
|
+
|
|
|
+from workreport.models import DailyReport
|
|
|
+
|
|
|
+
|
|
|
+class DailyReportViews(APIView):
|
|
|
+ def get(self, request):
|
|
|
+ data = DailyReport.objects.values('title', 'content', 'create_at', 'create_by', 'id')
|
|
|
+ return Response(data=data, status=status.HTTP_200_OK)
|