From 7cfb3139dd21b84b1e23876881403177b9254888 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 13 Jul 2015 00:36:41 -0500 Subject: [PATCH] Fix doc imports and a function signature --- docs/getting-started.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 63b433d..6811b78 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -95,7 +95,7 @@ Now, that's taken care of adding and removing WebSocket send channels for the we're not going to store a history of messages or anything and just replay any message sent in to all connected clients. Here's all the code:: - from channels import Channel + from channels import Channel, Group from channels.decorators import consumer @consumer("django.websocket.connect", "django.websocket.keepalive") @@ -344,7 +344,7 @@ have a ChatMessage model with ``message`` and ``room`` fields:: from .models import ChatMessage @consumer("chat-messages") - def msg_consumer(room, message): + def msg_consumer(channel, room, message): # Save to model ChatMessage.objects.create(room=room, message=message) # Broadcast to listening sockets