From adb8685f33dd6c1725863c41d0c8c6f44da7ba48 Mon Sep 17 00:00:00 2001 From: Tom <02millert@gmail.com> Date: Wed, 20 Jul 2016 22:29:46 +0100 Subject: [PATCH] Change content dict in code snippets to correct format --- docs/concepts.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/concepts.rst b/docs/concepts.rst index cf5319a..086ee63 100644 --- a/docs/concepts.rst +++ b/docs/concepts.rst @@ -185,8 +185,10 @@ set of channels (here, using Redis) to send updates to:: # 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, + "text": json.dumps({ + "id": instance.id, + "content": instance.content + }) }) # Connected to websocket.connect @@ -223,8 +225,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, + "text": json.dumps({ + "id": instance.id, + "content": instance.content + }) }) # Connected to websocket.connect