mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +03:00
updated getting started to include Group ref
This commit is contained in:
parent
19130ebb05
commit
bd6f61de98
|
@ -123,6 +123,8 @@ And, even though channels will expire out, let's add an explicit ``disconnect``
|
|||
handler to clean up as people disconnect (most channels will cleanly disconnect
|
||||
and get this called)::
|
||||
|
||||
from channels import Group
|
||||
|
||||
# Connected to websocket.disconnect
|
||||
def ws_disconnect(message):
|
||||
Group("chat").discard(message.reply_channel)
|
||||
|
|
Loading…
Reference in New Issue
Block a user