from rest_framework import serializers


class TaskListSerializer(serializers.ListSerializer):
    child = TaskSerializer()
allow_null = True
many = True
AttributeError while using Django Rest Framework with serializers