~/talk

Best buddies: Django and HTMX

Talkat PyCon Italia 2025 · 2025-05-28..05-31· [frontend-architecture]
links:none on file
slides:none on file

Claim: combine Django and HTMX to build SPA‑like behavior with zero custom JavaScript. Demos show a button-triggered joke (pure HTML response), a click‑to‑edit flow using GET and PUT to the same view that swaps templates back and forth, and an endless scroll adds six recipes pattern driven by the HTMX revealed trigger. Built a CRUD ingredient UI in ~30 minutes that works but requires many templates, views and tests; limitations: no client state, limited DOM manipulation, CSRF must be exposed (put token on <body>).

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:07What is HTMX and why use it
  3. 2:12Basic HTMX example and attributes
  4. 6:55Editing recipes with HTMX
  5. 9:03Django view integration with HTMX
  6. 11:13Endless scroll with HTMX
  7. 14:27Complex example with ingredients list
  8. 17:26Project structure for HTMX in Django
  9. 20:25Limitations and when not to use HTMX
  10. 21:09CSRF token handling in HTMX
  11. 22:33Resources and closing remarks
  12. 22:54Q&A session
~/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.