Fix typo in code in models section (#319)

Changed channel_session['room'] inside websockets consumer function to message.channel_session['room']
This commit is contained in:
qwitwa 2016-09-12 11:59:46 +01:00 committed by Andrew Godwin
parent 5464cba742
commit d1590afdcb

View File

@ -595,7 +595,7 @@ have a ChatMessage model with ``message`` and ``room`` fields::
def ws_message(message): def ws_message(message):
# Stick the message onto the processing queue # Stick the message onto the processing queue
Channel("chat-messages").send({ Channel("chat-messages").send({
"room": channel_session['room'], "room": message.channel_session['room'],
"message": message['text'], "message": message['text'],
}) })