开发者

Different authentication backend for the django admin

开发者 https://www.devze.com 2022-12-17 10:40 出处:网络
What would be the 开发者_运维知识库best solution to use a different authentication backend for the Django admin site?See the documentation, which contains this quote:

What would be the 开发者_运维知识库best solution to use a different authentication backend for the Django admin site?


See the documentation, which contains this quote:

The Django admin system is tightly coupled to the Django User object described at the beginning of this document. For now, the best way to deal with this is to create a Django User object for each user that exists for your backend (e.g., in your LDAP directory, your external SQL database, etc.) You can either write a script to do this in advance, or your authenticate method can do it the first time a user logs in.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号