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 DjangoUser
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.
精彩评论