I am using djoser with django rest framework, and I want to remove the username field from the create user form:
settings.py
:
'SERIALIZERS': {
'user_create': 'user.serializers.UserRegistrationSerializer',
},
serializers.py
:
class UserRegistrationSerializer(BaseUserRegistrationSerializer):
class Meta(BaseUserRegistrationSerializer.Meta):
fields = ('email', 'password')
I received the following error. How do you fix this?
TypeError at /auth/users/create create_user() missing 1 required positional argument: 'username'