Django2.1 authenticate the associated database will is_active solution

# Will detect whether the user is an active state (is_active), None is returned inactive (the default configuration)
AUTHENTICATION_BACKENDS matters = [ 'django.contrib.auth.backends.ModelBackend']

Add the following configuration file on the line in settings.py

# User does not detect an active state
AUTHENTICATION_BACKENDS = [ 'django.contrib.auth.backends.AllowAllUsersModelBackend']


---------------------
Original: https: //blog.csdn.net/qq_38692696/article/details/84582649

Guess you like

Origin www.cnblogs.com/springionic/p/10960764.html