(self, user_or_username)
return user_or_username
Returns the User object for the given username, or None.
Returns the User object for the given username, or None.
Returns the User object for the given username or None .
def get_user(self, user_or_username):
        """Returns the User object for the given username, or None."""
        if not user_or_username:
            return None
        if not isinstance(user_or_username, models.User):
            return models.User.objects.get(username=user_or_username)
        return user_or_username
def get_user ( self , user_or_username ) : if not user_or_username : return None if not isinstance ( user_or_username , models . User ) : return models . User . objects . get ( username = user_or_username ) return user_or_username