from django.contrib.auth import get_user_model

from rest_framework import serializers

User = get_user_model()


class UserDetailSerializer(serializers.ModelSerializer):
    password = serializers.CharField(write_only=True)
    email = serializers.EmailField(write_only=True)

    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'username', 'email', 'password')


class GetAllUsersSerializer(serializers.ModelSerializer):
    full_name = serializers.CharField(source='get_full_name')

    class Meta:
        model = User
        fields = ('id', 'full_name')

fcbc36ac2f0cc109f607f8a35e3dcce34212e77d
<mask token>


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


    class Meta:
        model = User
        fields = 'id', 'full_name'

<mask token>


class UserDetailSerializer(serializers.ModelSerializer):
    password = serializers.CharField(write_only=True)
    email = serializers.EmailField(write_only=True)


    class Meta:
        model = User
        fields = 'first_name', 'last_name', 'username', 'email', 'password'


class GetAllUsersSerializer(serializers.ModelSerializer):
    full_name = serializers.CharField(source='get_full_name')


    class Meta:
        model = User
        fields = 'id', 'full_name'

<mask token>
User = get_user_model()


class UserDetailSerializer(serializers.ModelSerializer):
    password = serializers.CharField(write_only=True)
    email = serializers.EmailField(write_only=True)


    class Meta:
        model = User
        fields = 'first_name', 'last_name', 'username', 'email', 'password'


class GetAllUsersSerializer(serializers.ModelSerializer):
    full_name = serializers.CharField(source='get_full_name')


    class Meta:
        model = User
        fields = 'id', 'full_name'

from django.contrib.auth import get_user_model
from rest_framework import serializers
User = get_user_model()


class UserDetailSerializer(serializers.ModelSerializer):
    password = serializers.CharField(write_only=True)
    email = serializers.EmailField(write_only=True)


    class Meta:
        model = User
        fields = 'first_name', 'last_name', 'username', 'email', 'password'


class GetAllUsersSerializer(serializers.ModelSerializer):
    full_name = serializers.CharField(source='get_full_name')


    class Meta:
        model = User
        fields = 'id', 'full_name'

from django.contrib.auth import get_user_model

from rest_framework import serializers

User = get_user_model()


class UserDetailSerializer(serializers.ModelSerializer):
    password = serializers.CharField(write_only=True)
    email = serializers.EmailField(write_only=True)

    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'username', 'email', 'password')


class GetAllUsersSerializer(serializers.ModelSerializer):
    full_name = serializers.CharField(source='get_full_name')

    class Meta:
        model = User
        fields = ('id', 'full_name')
