Using Django 4.2's StreamingHttpResponse and HTMX SSE to provide real time notifications
summary
Claims that Django 4.2’s async iterator streaming via StreamingHttpResponse plus HTMX SSE replaces Channels for simple real‑time UI, reducing the server side to about a page of code. Implementation uses Redis pubsub to publish JSON with template name and context, renders partials server‑side, streams HTML fragments over an ASGI server (Daphne or Uvicorn), needs one tiny Bootstrap JS hook, and suits tens of simultaneous users not hundreds.
AI-written summary · about
chapters (9)
- 0:00Intro
- 0:28Introduction
- 1:48About me
- 2:44StreamingHttpResponse
- 4:42Django Channels
- 9:01Why stream realtime notifications
- 13:27How it works
- 15:12Demo
- 22:37Other notes
related talks
26mDjango 5.0: Elevating Experiences with Server-Sent Events – A Journey from Polling to Real-Time Vibe
31mReinventing Django for the Real-Time Web
24mBack to the Future of Hypermedia in Django
29mBuilding real time applications with Django
22mDjango Channels Teaching a mature framework new tricks
27mTaking Django Async
38mButter smooth, interactive applications with Django...
26mModern web apps with (almost) no JS: Enhancing UX with HTMX in Django
