dvadmin-backend/apps/vadmin/utils/backends.py
def authenticate(self, request):
        """
        Returns a `User` if the request session currently has a logged in user.
        Otherwise returns `None`.
        """
        # Get the session-based user from the underlying HttpRequest object
        user = getattr(request._request, 'user', None)
        # Unauthenticated, CSRF validation not required
        if not user or not user.is_active:
            return None
        # self.enforce_csrf(request)
        # CSRF passed with authenticated user
        return user, None

        Returns a `User` if the request session currently has a logged in user.
        Otherwise returns `None`.
        
Returns a `User` if the request session currently has a logged in user.
Otherwise returns `None`.
Returns a ` User ` if the request session currently has a logged in user . Otherwise returns ` None ` .
def authenticate(self, request):
        user = getattr(request._request, 'user', None)
        if not user or not user.is_active:
            return None
        return user, None
def authenticate ( self , request ) : user = getattr ( request . _request , 'user' , None ) if not user or not user . is_active : return None return user , None
Returns a `User` if the request session currently has a logged in user.
Returns a ` User ` if the request session currently has a logged in user .
"""
        Returns a `User` if the request session currently has a logged in user.
        Otherwise returns `None`.
        """ # Get the session-based user from the underlying HttpRequest object # Unauthenticated, CSRF validation not required # self.enforce_csrf(request) # CSRF passed with authenticated user
self
request