错误原因是你的项目使用的不是Django自带的用户表,采用的自定义的用户表,这个时候需要在settings.py里面进行指定。
AUTH_USER_MODEL = 'usersApp.UserProfile' # usersApp是app名,UserProfile是models中的类名