class VendorSerializer(serializers.ModelSerializer):
class Meta:
model = Vendors
fields = ('user', 'title')
class ModelSerializer(serializers.ModelSerializer):
class Meta:
model = Model
fields = ('id', 'vendor', 'text')
class ModelSerializer(serializers.ModelSerializer):
vendor = VendorSerializer()
class Meta:
model = Model
fields = ('id', 'vendor', 'text')