我使用的是內置在位於 django.contrib.auth.models
用戶模型這是我serialiers.py文件: from rest_framework import serializers
from django.contrib.auth.models import User
class UserSerializer(serializers.ModelSerializer)
我使用Django Django的,所以我的Registe形式如下 class RegisterForm(forms.ModelForm):
class Meta:
model = User
fields = ('username', 'email', 'password',)
widgets = {
'password': forms.