~/talk

Using Django 4.2's StreamingHttpResponse and HTMX SSE to provide real time notifications

Talkat PyCon AU 2023 · 2023-08-18..08-22· [web-platform, django, python]
name:Dan Sloan
links:none on file
slides:none on file

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

  1. 0:00Intro
  2. 0:28Introduction
  3. 1:48About me
  4. 2:44StreamingHttpResponse
  5. 4:42Django Channels
  6. 9:01Why stream realtime notifications
  7. 13:27How it works
  8. 15:12Demo
  9. 22:37Other notes
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.