mirror of
https://github.com/django/daphne.git
synced 2025-07-16 10:52:17 +03:00
commit
0cf0b7c767
|
@ -27,7 +27,7 @@ app, and put this in a ``consumers.py`` file in the app::
|
|||
@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