⬅︎ Back to Who was logged in during a Django exception
The traceback include the session id. What I do is lookup the session, which will contain the user's id if the person was logged in.e.g.session = Session.objects.get("7ac7fa8d7cf56a826c94a559434a9c7c")data = session.get_decoded()user = User.objects.get(data['_auth_user_id'])
Comment
The traceback include the session id. What I do is lookup the session, which will contain the user's id if the person was logged in.
e.g.
session = Session.objects.get("7ac7fa8d7cf56a826c94a559434a9c7c")
data = session.get_decoded()
user = User.objects.get(data['_auth_user_id'])