htmx + Flask: Modern Python Web; Hold the JavaScript
summary
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
chapters (11)
- 0:00Introduction to HTMX and Flask
- 1:11What is HTMX?
- 3:56Click to edit demo
- 5:42Building active search feature
- 8:08Adding HTMX attributes
- 10:13Handling HTMX requests
- 12:23Fixing flicker with delay
- 14:07Adding deep linking
- 16:34Jinja partials for reuse
- 17:36Infinite scroll implementation
- 18:40Summary and resources
