from django.contrib.sessions.models import Session
from django.contrib.auth.models import User

def message(request, socket, context, message):
    session = Session.objects.get(session_key=message['session_key'])
Получение пользователя в django-socketio