Skip to content

serializers

ContentTypeSerializer

Bases: serializers.ModelSerializer

Source code in tasks/serializers.py
 8
 9
10
11
class ContentTypeSerializer(serializers.ModelSerializer):
    class Meta:
        model = ContentType
        exclude = []

Meta

Source code in tasks/serializers.py
 9
10
11
class Meta:
    model = ContentType
    exclude = []

exclude = [] class-attribute

model = ContentType class-attribute

TaskSerializer

Bases: serializers.ModelSerializer

Source code in tasks/serializers.py
14
15
16
17
18
19
20
class TaskSerializer(serializers.ModelSerializer):
    content_type = ContentTypeSerializer(read_only=True)
    creator = ShortUserSerializer(read_only=True)

    class Meta:
        model = Task
        exclude = []

content_type = ContentTypeSerializer(read_only=True) class-attribute

creator = ShortUserSerializer(read_only=True) class-attribute

Meta

Source code in tasks/serializers.py
18
19
20
class Meta:
    model = Task
    exclude = []

exclude = [] class-attribute

model = Task class-attribute