Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UserSerializer(serializers.ModelSerializer):
- """ A serializer class for the User model """
- class Meta:
- # Specify the model we are using
- model = User
- # Specify the fields that should be made accessible.
- # Mostly it is all fields in that model
- fields = ('id', 'first_name', 'last_name', 'username',
- 'password', 'is_active', 'is_superuser')
Add Comment
Please, Sign In to add comment