我正在尝试将 django auth ldap (v1.1.7) 与自定义用户模型一起使用,虽然我已经处理了所有其他事情,但我仍然遇到了一个熟悉的错误消息,我只是不知道如何修复。
运行python manage.py syncdb
返回:
CommandError: One or more models did not validate:
django_auth_ldap.testprofile: 'user' defines a relation with the model 'auth.Use
r', which has been swapped out. Update the relation to point at settings.AUTH_US
ER_MODEL.
我的问题是 - 我在哪里可以找到django_auth_ldap.testprofile
和更新关系以解决问题?
提前感谢您帮助我。
LE:好的,经过一番谷歌搜索后,我发现这个 testprofile 位于 django_auth_ldap/models.py 并得到这个:我搜索了我所有的文件并找到了该文件,将其修改为指向 settings.AUTH_USER_MODEL 并且我仍然收到相同的错误。
谁能帮我解决这个问题?