
from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from envs.models import Envs


class EnvsModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = Envs
        exclude = ['update_time']
        # fields = '__all__'
        extra_kwargs = {
            'create_time': {
                'read_only': True,
                'format': '%Y-%m-%d %H:%M:%S'
            }
        }


class EnvsNameSerializer(serializers.ModelSerializer):

    class Meta:
        model = Envs
        fields = ('id', 'name')
0e23c57fabf6f792b545973d54f9170330e7871b
<mask token>

<mask token>


class EnvsNameSerializer(serializers.ModelSerializer):


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

<mask token>


class EnvsModelSerializer(serializers.ModelSerializer):


    class Meta:
        model = Envs
        exclude = ['update_time']
        extra_kwargs = {'create_time': {'read_only': True, 'format':
            '%Y-%m-%d %H:%M:%S'}}


class EnvsNameSerializer(serializers.ModelSerializer):


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

from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from envs.models import Envs


class EnvsModelSerializer(serializers.ModelSerializer):


    class Meta:
        model = Envs
        exclude = ['update_time']
        extra_kwargs = {'create_time': {'read_only': True, 'format':
            '%Y-%m-%d %H:%M:%S'}}


class EnvsNameSerializer(serializers.ModelSerializer):


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


from rest_framework import serializers
from rest_framework.validators import UniqueValidator
from envs.models import Envs


class EnvsModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = Envs
        exclude = ['update_time']
        # fields = '__all__'
        extra_kwargs = {
            'create_time': {
                'read_only': True,
                'format': '%Y-%m-%d %H:%M:%S'
            }
        }


class EnvsNameSerializer(serializers.ModelSerializer):

    class Meta:
        model = Envs
        fields = ('id', 'name')