diff --git a/stude/accounts/serializers.py b/stude/accounts/serializers.py index 89f8487..ac5c23a 100644 --- a/stude/accounts/serializers.py +++ b/stude/accounts/serializers.py @@ -16,7 +16,7 @@ class CustomUserSerializer(BaseUserSerializer): class Meta(BaseUserSerializer.Meta): model = CustomUser - fields = ('username', 'email', 'password', + fields = ('username', 'email', 'student_id_number', 'year_level', 'semester', 'course', 'subjects', 'avatar', 'first_name', 'last_name', 'is_banned', 'user_status') # The model from your custom user diff --git a/stude/config/settings.py b/stude/config/settings.py index c31d26f..e519d94 100644 --- a/stude/config/settings.py +++ b/stude/config/settings.py @@ -142,6 +142,7 @@ DJOSER = { 'USER_AUTHENTICATION_RULES': ['djoser.authentication.TokenAuthenticationRule'], 'SERIALIZERS': { 'user': 'accounts.serializers.CustomUserSerializer', + 'current_user': 'accounts.serializers.CustomUserSerializer', 'user_create': 'accounts.serializers.UserRegistrationSerializer', }, }