Created
August 7, 2019 13:16
-
-
Save akshar-raaj/d8f237672b59a19795a332069f0ac45f to your computer and use it in GitHub Desktop.
User serializer
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): | |
| class Meta: | |
| model = User | |
| fields = ('username', 'email', 'first_name', 'last_name', 'password') | |
| extra_kwargs = { | |
| 'password': {'write_only': True} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment