mirror of
https://github.com/django/daphne.git
synced 2025-07-22 21:39:46 +03:00
Fixed wrong code on doc
`.send()` won't get positional arguments.
This commit is contained in:
parent
60f0680ec2
commit
768722dc64
|
@ -26,7 +26,7 @@ app, and put this in a ``consumers.py`` file in the app::
|
|||
@Channel.consumer("django.wsgi.request")
|
||||
def http_consumer(response_channel, path, **kwargs):
|
||||
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
|
||||
messages must be JSON-serialisable, the request and response messages
|
||||
|
|
Loading…
Reference in New Issue
Block a user