Previously I had been working with the back-end, but after few months of not coding, I'm now not really comfortable with the code I have now. So I use Djoser and I have this in my project settings.py file
...
'SERIALIZERS': {
'user_create': 'backend.accounts.serializers.UserCreateSerializer',
'user': 'backend.accounts.serializers.UserCreateSerializer',
'user_delete': 'djoser.serializers.UserDeleteSerializer',
}
...
This should override the default Djoser serializer, but as I can see it does nothing.
/auth/users/me/ - Returns this
{
"email": "test@gmail.com",
"id": 1,
"username": "test"
}
but I have this as my serializer inside backend/accounts/serializers
class UserCreateSerializer(UserCreateSerializer):
delete_request = DeleteUserSerializer(read_only=True)
class Meta(UserCreateSerializer.Meta):
model = User
fields = (
'id',
'email',
'username',
'password',
'delete_request',
)
Why does it not override?