from api.task.models import * from rest_framework.serializers import ListSerializer, ModelSerializer class TaskSerializer(ModelSerializer): class Meta: model = Task list_serializer_class = ListSerializer fields = '__all__'