# -*- coding: utf-8 -*-

from rest_framework import serializers
from shops.models import ShopImage


class ShopImageSerializer(serializers.ModelSerializer):

    def create(self, validated_data):
         return ShopImage.objects.create(
            title = validated_data['title'],
            shop = validated_data['shop'],
            image = validated_data['image'],
        )

    class Meta:
        model = ShopImage
        fields = ('title', 'image', 'shop')
        shop = serializers.Field(source='shop.id')

ae9f32cc3dce337fc30cb6f81c03a86c04beb909
<mask token>

<mask token>


class ShopImageSerializer(serializers.ModelSerializer):
    <mask token>


    class Meta:
        model = ShopImage
        fields = 'title', 'image', 'shop'
        shop = serializers.Field(source='shop.id')

<mask token>


class ShopImageSerializer(serializers.ModelSerializer):

    def create(self, validated_data):
        return ShopImage.objects.create(title=validated_data['title'], shop
            =validated_data['shop'], image=validated_data['image'])


    class Meta:
        model = ShopImage
        fields = 'title', 'image', 'shop'
        shop = serializers.Field(source='shop.id')

from rest_framework import serializers
from shops.models import ShopImage


class ShopImageSerializer(serializers.ModelSerializer):

    def create(self, validated_data):
        return ShopImage.objects.create(title=validated_data['title'], shop
            =validated_data['shop'], image=validated_data['image'])


    class Meta:
        model = ShopImage
        fields = 'title', 'image', 'shop'
        shop = serializers.Field(source='shop.id')

# -*- coding: utf-8 -*-

from rest_framework import serializers
from shops.models import ShopImage


class ShopImageSerializer(serializers.ModelSerializer):

    def create(self, validated_data):
         return ShopImage.objects.create(
            title = validated_data['title'],
            shop = validated_data['shop'],
            image = validated_data['image'],
        )

    class Meta:
        model = ShopImage
        fields = ('title', 'image', 'shop')
        shop = serializers.Field(source='shop.id')
