python - Use HTTP session in Django Channels -


i have following problem. have django web application , need upload csv files , stream them using django-channels. decided save path of uploaded csv file in http session.

from django-channels documentation understood can access http session object inside websocket, using following code returns object not have file path added earlier.

@http_session def ws_connect(message):     print("connected on data websocket")     print(message.http_session.__dict__)     group("data").add(message.reply_channel) 

result of printing http session is:

{'modified': false, 'accessed': false, '_sessionbase__session_key':                        '92zcls0hxqlk1352xwja6tvytjebjfw7', 'serializer': <class 'django.core.signing.jsonserializer'>} 

my question is, can access http session in websockets? or should consider way of doing this?


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -