Django - Read the current's user authentication backend class
问题 I am using a custom authentication backend with Django, to automatically create and login users from a legacy system. My Backend class is this: from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import User from sfi.models import Employee import base64, hashlib class SFIUserBackend(ModelBackend): def authenticate(self, username=None, password=None): if not username or not password: return digest = base64.standard_b64encode(hashlib.md5(password).digest())