Skip to content

Instantly share code, notes, and snippets.

@johngrantuk
Created March 29, 2016 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johngrantuk/0e1cc66898674c7a4946 to your computer and use it in GitHub Desktop.
Save johngrantuk/0e1cc66898674c7a4946 to your computer and use it in GitHub Desktop.
Django Channels ws_message consumer
def ws_message(message):
# ASGI WebSocket packet-received and send-packet message types
# both have a "text" key for their textual data.
print("Received!!" + message['text'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment