Created
March 18, 2020 01:43
-
-
Save yoandresaav/b6a8c6237337add8cbac749648444f87 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
full_name = serializers.SerializerMethodField('get_user_full_name') | |
def get_user_full_name(self, obj): | |
request = self.context['request'] | |
user = request.user | |
name = user.first_name + " " + user.last_name | |
return name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment