Django Channels websocket consumers

If you’re worked your way through the official [Channels tutorial](
(Tutorial Part 1: Basic Setup — Channels 4.0.0 documentation), then I suggest you go back through it and read the code in its entirety, to try and re-solidify the concepts it presents. (It is, after all, a tutorial on a Chat system, making it specifically related to what you’re trying to do.)

(If you haven’t worked your way through it, now’s the time to do so.)

There are also a number of threads here containing more detailed information:

See:

as a couple of recent examples.

I had also found Andrew Godwin’s multichat in channels-examples to have been very helpful to me when I was getting started with channels. I don’t think it’s specifically valid any more - it was written for Channels 1 - but the fundamental concepts presented would still apply.

This really isn’t a good idea if you’re going to demo this with connections from multiple systems. See the warning at Channel Layers — Channels 4.0.0 documentation

1 Like