gpt4 book ai didi

django - django admin 的不同身份验证后端

转载 作者:行者123 更新时间:2023-12-02 09:34:52 26 4
gpt4 key购买 nike

为 Django 管理站点使用不同的身份验证后端的最佳解决方案是什么?

最佳答案

参见the documentation ,其中包含以下引用:

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.

关于django - django admin 的不同身份验证后端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2108603/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com