Bishnu

Results 2 comments of Bishnu

Problem is: AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend'] the default "ModelBackend" authentication backend does not allow users with is_active = False to log in. so if you want to login with is_active= False,...

if all(credentials.values()): user = authenticate(**credentials) if user: if not user.is_active: msg = _('User account is disabled.') raise serializers.ValidationError(msg) .............. in this portion ,**authenticate(**credentials)** will return **none** when **is_active = false**...