mirror of
https://github.com/django/daphne.git
synced 2025-08-04 02:20:08 +03:00
Update getting started example one more time.
This commit is contained in:
parent
a699eec7ee
commit
b81bbc662c
|
@ -408,12 +408,12 @@ name in the path of your WebSocket request and a query string with your username
|
|||
# Connected to websocket.receive
|
||||
@channel_session
|
||||
def ws_message(message, room_name):
|
||||
Group("chat-%s" % room_name).send(
|
||||
Group("chat-%s" % room_name).send({
|
||||
"text": json.dumps({
|
||||
"text": message["text"],
|
||||
"username": message.channel_session["username"],
|
||||
}),
|
||||
)
|
||||
})
|
||||
|
||||
# Connected to websocket.disconnect
|
||||
@channel_session
|
||||
|
|
Loading…
Reference in New Issue
Block a user