~/talk

htmx + Flask: Modern Python Web; Hold the JavaScript

Talkat PyBay 2021 · on Saturday, 2021-10-09· [web-platform, python]
slides:none on file

Demonstrates building a dynamic Flask site using HTMX to move interactivity to server-rendered HTML: adds live search with hx-get="/videos/search", hx-trigger="keyup delay:250ms", and hx-target="#search-results" so typing issues fire partial requests (no custom JavaScript). Server returns a Jinja partial when HX header is present, supports history with hx-push-url="true", and reuses UI via a render_partial extension; also implements infinite scroll with HX revealed trigger. All examples run and show smooth updates.

AI-written summary · about

  1. 0:00Introduction to HTMX and Flask
  2. 1:11What is HTMX?
  3. 3:56Click to edit demo
  4. 5:42Building active search feature
  5. 8:08Adding HTMX attributes
  6. 10:13Handling HTMX requests
  7. 12:23Fixing flicker with delay
  8. 14:07Adding deep linking
  9. 16:34Jinja partials for reuse
  10. 17:36Infinite scroll implementation
  11. 18:40Summary and resources
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.