Skip to Main Content
Django 3 By Example - Third Edition
book

Django 3 By Example - Third Edition

by Antonio Mele
March 2020
Beginner to intermediate content levelBeginner to intermediate
568 pages
12h 14m
English
Packt Publishing
Content preview from Django 3 By Example - Third Edition

13

Building a Chat Server

In the previous chapter, you created a RESTful API for your project. In this chapter, you will build a chat server for students using Django Channels. Students will be able to access a different chat room for each course they are enrolled on. To create the chat server, you will learn how to serve your Django project through Asynchronous Server Gateway Interface (ASGI), and you will implement asynchronous communication.

In this chapter, you will:

  • Add Channels to your project
  • Build a WebSocket consumer and appropriate routing
  • Implement a WebSocket client
  • Enable a channel layer with Redis
  • Make your consumer fully asynchronous

Creating a chat application

You are going to implement a chat server to provide students with ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Django Unleashed

Django Unleashed

Andrew Pinkham

Publisher Resources

ISBN: 9781838981952Supplemental Content