用了 Django 一段时间后,发现存在各种各样的问题

Django 2.1 用户认证系统authenticate()一直返回None

 

解决方法:

(1) User.objects.create_user(username=username,password=password)

(2) is_active=True

Django 2.1 用户认证系统 authenticate() 一直返回None_解决方法