用于登录功能的django信号是什么?用户已添加到请求会话表中.那么在Django auth.login函数中对signal的最后一行调用是什么?
@sensitive_post_parameters()
@csrf_protect
@never_cache
def login(request, user):
"""
Persist a user id and a backend in the request. This way a user doesn't
have to reauthenticate on every request. Note that data set during
the anonymous session is retained when the user logs in.
"""
session_auth_hash = ''
if user is None:
user = request.user
if hasattr(user, 'get_session_auth_hash'):
session_auth_hash = user.get_session_auth_hash()
if SESSION_KEY in request.session:
if _get_user_session_key(request) != user.pk or (
session_auth_hash and
request.session.get(HASH_SESSION_KEY) != session_auth_hash):
# To avoid …Run Code Online (Sandbox Code Playgroud)