Fixed wrong code on doc

`.send()` won't get positional arguments.
This commit is contained in:
Hiroki Kiyohara 2015-07-09 16:10:39 +09:00
parent 60f0680ec2
commit 768722dc64

View File

@ -26,7 +26,7 @@ app, and put this in a ``consumers.py`` file in the app::
@Channel.consumer("django.wsgi.request") @Channel.consumer("django.wsgi.request")
def http_consumer(response_channel, path, **kwargs): def http_consumer(response_channel, path, **kwargs):
response = HttpResponse("Hello world! You asked for %s" % path) response = HttpResponse("Hello world! You asked for %s" % path)
Channel(response_channel).send(response.channel_encode()) Channel(response_channel).send(**response.channel_encode())
The most important thing to note here is that, because things we send in The most important thing to note here is that, because things we send in
messages must be JSON-serialisable, the request and response messages messages must be JSON-serialisable, the request and response messages