Merge pull request #4 from hirokiky/patch-1

Fixed wrong code on doc
This commit is contained in:
Andrew Godwin 2015-07-13 00:12:55 -05:00
commit 0cf0b7c767

View File

@ -27,7 +27,7 @@ app, and put this in a ``consumers.py`` file in the app::
@consumer("django.wsgi.request") @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