json - How to serialize relation -
try post json api serializer: from rest_framework import serializers models import order, orderproduct, delivery, payments class deliveryserializer(serializers.modelserializer): class meta: model = delivery fields = ('delivery_time','delivery_adress','phone')#'id', def create(self, validated_data): """ create , return new `snippet` instance, given validated data. """ return delivery.objects.create(**validated_data) class paymentsserializer(serializers.modelserializer): class meta: model = payments #fields = (title) #'id', def create(self, validated_data): """ create , return new `snippet` instance, given validated data. """ return payments.objects.create(**validated_data) class orderserializer(serializers.modelserializer): delivery = deliveryserializer(r...