From 41857987316235b06a93d3e348e432bf8745abb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Oubi=C3=B1a?= Date: Sun, 12 Feb 2017 01:41:36 +0100 Subject: [PATCH] Typo in Example using class-based consumer (#526) Typo in Example using class-based consumer from section "2.6.3 WebSocket Multiplexing" --- docs/generics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/generics.rst b/docs/generics.rst index c604930..459ce36 100644 --- a/docs/generics.rst +++ b/docs/generics.rst @@ -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