from rest_framework import serializers

from .models import PRDeployment


class PRDeploymentSerializer(serializers.ModelSerializer):

    class Meta:
        model = PRDeployment
        fields = (
            'id',
            'image',
            'log',
            'port',
            'succeeded',
            'start_time',
            'ttl',
            'is_pending',
            'is_alive'
        )

from rest_framework import serializers

from .models import PRDeployment


class PRDeploymentSerializer(serializers.ModelSerializer):

    class Meta:
        model = PRDeployment
        fields = (
            'id',
            'image',
            'tasks',
            'port',
            'succeeded',
            'start_time',
            'ttl',
            'is_pending',
            'is_alive'
        )

Add tasks and remove log from deployment serializer