Different authentication backend for the django admin

backend, django, django-admin

Solution

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.

Problem

What would be the best solution to use a different authentication backend for the Django admin site?

Original source