uncloud-mravi/uncloud/ungleich_service/serializers.py

12 lines
422 B
Python
Raw Normal View History

from rest_framework import serializers
from .models import MatrixServiceProduct
from uncloud_vm.serializers import VMProductSerializer
class MatrixServiceProductSerializer(serializers.ModelSerializer):
vm = VMProductSerializer()
class Meta:
model = MatrixServiceProduct
fields = ['uuid', 'order', 'owner', 'status', 'vm', 'domain']
read_only_fields = ['uuid', 'order', 'owner', 'status']