mirror of
https://github.com/django/daphne.git
synced 2025-04-21 01:02:06 +03:00
Docs: reply_channel is a property of message
Update an example where `reply_channel` was a global, and contained the channel name rather than a channel objects.
This commit is contained in:
parent
b7b11cb075
commit
88d3379e31
|
@ -113,7 +113,7 @@ message. Suddenly, a view is merely another example of a consumer::
|
|||
# Run view
|
||||
django_response = view(django_request)
|
||||
# Encode the response into JSON-compat format
|
||||
Channel(reply_channel).send(django_response.encode())
|
||||
message.reply_channel.send(django_response.encode())
|
||||
|
||||
In fact, this is how Channels works. The interface servers transform connections
|
||||
from the outside world (HTTP, WebSockets, etc.) into messages on channels,
|
||||
|
|
Loading…
Reference in New Issue
Block a user