1from rest_framework.serializers import ModelSerializer
2from django.contrib.auth.hashers import make_password
3
4
5class UserSerializer(ModelSerializer):
6 class Meta:
7 model = backend.models.User
8 fields = ('username', 'email', 'password',)
9
10 validate_password = make_password