Created
July 22, 2019 19:24
-
-
Save akshar-raaj/35f0aaab75739130e2ab3419be4c2995 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class UserSerializer(serializers.ModelSerializer): | |
| user_name = serializers.CharField(source='username') | |
| full_name = serializers.CharField(source='get_full_name') | |
| class Meta: | |
| model = User | |
| fields = ('user_name', 'email', 'first_name', 'last_name', 'full_name') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment