Fakultas Ilmu Komputer UI

serializers.py 266 Bytes
Newer Older
Glenda Emanuella Sutanto's avatar
Glenda Emanuella Sutanto committed
1
2
3
4
5
6
7
8
from rest_framework import serializers
from .models import CustomUser


class CustomUserDetailsSerializer(serializers.ModelSerializer):

    class Meta:
        model = CustomUser
9
10
        fields = ('id', 'name', 'email',)
        read_only_fields = ('id', 'email',)