from drf_extra_fields.fields import Base64ImageField
from rest_framework import serializers

from .models import Organization


class OrganizationSerializer(serializers.ModelSerializer):
    class Meta:
        model = Organization
        fields = (
            'id',
            'name',
        )


class OrganizationDetailSerializer(serializers.ModelSerializer):
    logo_image = Base64ImageField(source='logo', required=False)

    class Meta:
        model = Organization
        fields = (
            'id',
            'name',
            'phone_number',
            'email',
            'url',
            'address',
            'description',
            'logo_image',
        )

f8f66f6ed1a5ec49ed3adde7a02830b79c1675a9
<mask token>


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


    class Meta:
        model = Organization
        fields = ('id', 'name', 'phone_number', 'email', 'url', 'address',
            'description', 'logo_image')

<mask token>


class OrganizationDetailSerializer(serializers.ModelSerializer):
    logo_image = Base64ImageField(source='logo', required=False)


    class Meta:
        model = Organization
        fields = ('id', 'name', 'phone_number', 'email', 'url', 'address',
            'description', 'logo_image')

<mask token>


class OrganizationSerializer(serializers.ModelSerializer):


    class Meta:
        model = Organization
        fields = 'id', 'name'


class OrganizationDetailSerializer(serializers.ModelSerializer):
    logo_image = Base64ImageField(source='logo', required=False)


    class Meta:
        model = Organization
        fields = ('id', 'name', 'phone_number', 'email', 'url', 'address',
            'description', 'logo_image')

from drf_extra_fields.fields import Base64ImageField
from rest_framework import serializers
from .models import Organization


class OrganizationSerializer(serializers.ModelSerializer):


    class Meta:
        model = Organization
        fields = 'id', 'name'


class OrganizationDetailSerializer(serializers.ModelSerializer):
    logo_image = Base64ImageField(source='logo', required=False)


    class Meta:
        model = Organization
        fields = ('id', 'name', 'phone_number', 'email', 'url', 'address',
            'description', 'logo_image')

from drf_extra_fields.fields import Base64ImageField
from rest_framework import serializers

from .models import Organization


class OrganizationSerializer(serializers.ModelSerializer):
    class Meta:
        model = Organization
        fields = (
            'id',
            'name',
        )


class OrganizationDetailSerializer(serializers.ModelSerializer):
    logo_image = Base64ImageField(source='logo', required=False)

    class Meta:
        model = Organization
        fields = (
            'id',
            'name',
            'phone_number',
            'email',
            'url',
            'address',
            'description',
            'logo_image',
        )
