Typo in Example using class-based consumer (#526)

Typo in Example using class-based consumer from section "2.6.3 WebSocket Multiplexing"
This commit is contained in:
Pablo Oubiña 2017-02-12 01:41:36 +01:00 committed by Andrew Godwin
parent b14bbeebe4
commit 4185798731

View File

@ -194,7 +194,7 @@ Example using class-based consumer::
from channels.generic.websockets import WebsocketDemultiplexer, JsonWebsocketConsumer
class EchoConsumer(websockets.JsonWebsocketConsumer):
class EchoConsumer(JsonWebsocketConsumer):
def connect(self, message, multiplexer, **kwargs):
# Send data with the multiplexer
multiplexer.send({"status": "I just connected!"})
@ -207,7 +207,7 @@ Example using class-based consumer::
multiplexer.send({"original_message": content})
class AnotherConsumer(websockets.JsonWebsocketConsumer):
class AnotherConsumer(JsonWebsocketConsumer):
def receive(self, content, multiplexer=None, **kwargs):
# Some other actions here
pass