serializer.py 370 B

12345678910111213
  1. from rest_framework import serializers
  2. from rest_framework.serializers import ListSerializer
  3. from workreport.models import DailyRreport
  4. class DailyReportSerializer(serializers.ModelSerializer):
  5. class Meta:
  6. model = DailyRreport
  7. # fields = ['url', 'username', 'email', 'is_staff']
  8. list_serializer = ListSerializer
  9. fields = '__all__'