From df0ae80bfb7ebf6dbb9b783f1f1a3675264b2bd3 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 31 May 2016 18:34:06 +0000 Subject: [PATCH] Fix send call in concepts doc --- docs/concepts.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/concepts.rst b/docs/concepts.rst index b1f5de8..cf5319a 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -184,10 +184,10 @@ set of channels (here, using Redis) to send updates to:: def send_update(sender, instance, **kwargs): # Loop through all response channels and send the update for reply_channel in redis_conn.smembers("readers"): - Channel(reply_channel).send( - id=instance.id, - content=instance.content, - ) + Channel(reply_channel).send({ + "id": instance.id, + "content": instance.content, + }) # Connected to websocket.connect def ws_connect(message): @@ -222,10 +222,10 @@ abstraction as a core concept called Groups:: @receiver(post_save, sender=BlogUpdate) def send_update(sender, instance, **kwargs): - Group("liveblog").send( - id=instance.id, - content=instance.content, - ) + Group("liveblog").send({ + "id": instance.id, + "content": instance.content, + }) # Connected to websocket.connect def ws_connect(message):