コード例 #1
0
def set_current_user(user=None):
    """Update the user associated with the current request thread."""
    from crum.signals import current_user_setter

    results = current_user_setter.send_robust(set_current_user, user=user)
    for receiver, response in results:
        if isinstance(response, Exception):
            _logger.exception("%r raised exception: %s", receiver, response)
コード例 #2
0
ファイル: __init__.py プロジェクト: truffi01/BB
def set_current_user(user=None):
    """
    Update the user associated with the current request thread.
    """
    from crum.signals import current_user_setter
    results = current_user_setter.send_robust(set_current_user, user=user)
    for receiver, response in results:
        if isinstance(response, Exception):
            _logger.exception('%r raised exception: %s', receiver, response)