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:
George Brocklehurst 2016-02-06 18:26:41 -05:00
parent b7b11cb075
commit 88d3379e31
No known key found for this signature in database
GPG Key ID: 0C643A97B51FFCFB

View File

@ -113,7 +113,7 @@ message. Suddenly, a view is merely another example of a consumer::
# Run view # Run view
django_response = view(django_request) django_response = view(django_request)
# Encode the response into JSON-compat format # 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 In fact, this is how Channels works. The interface servers transform connections
from the outside world (HTTP, WebSockets, etc.) into messages on channels, from the outside world (HTTP, WebSockets, etc.) into messages on channels,