-
-
Save brunomichetti/b19356eb513c2938bc20c852dca0d401 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# serializers.py in the users Django app | |
... | |
from users.models import CustomUser | |
... | |
class CustomUserDetailsSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = CustomUser | |
fields = ( | |
'pk', | |
'email', | |
'phone_number', | |
'gender', | |
) | |
read_only_fields = ('pk', 'email', 'phone_number',) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment