Skip to content

Commit

Permalink
Fix doc imports and a function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewgodwin committed Jul 13, 2015
1 parent dfc11d4 commit 7cfb313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7cfb313

Please sign in to comment.