MCPcopy
hub / github.com/django/django / _get_user_session_key

Function _get_user_session_key

django/contrib/auth/__init__.py:92–95  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

90
91
92def _get_user_session_key(request):
93 # This value in the session is always serialized to a string, so we need
94 # to convert it back to Python whenever we access it.
95 return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])
96
97
98async def _aget_user_session_key(request):

Callers 2

loginFunction · 0.85
get_userFunction · 0.85

Calls 2

get_user_modelFunction · 0.85
to_pythonMethod · 0.45

Tested by

no test coverage detected