HTMX + Django: Modern Python Web Apps, Hold the JavaScript Transcripts
Chapter: Course conclusion and review
Lecture: Using HTMX

Login or purchase this course to watch this video and the rest of the course contents.
0:00 The core idea behind HTMX is to use parts of HTML pages the same way a browser uses full pages.
0:08 These partial pages can be served by Django like any other view, and then HTMX inserts or replaces that content into the active page.
0:18 You can even use the same view to build a page and the partials associated with it. HTMLX sets a request header whenever it is the source of a fetch.
0:29 You can look for this header to tell whether a page or a partial should be rendered.
0:34 The Django HTMLX library provides middleware that inserts an HTMLXDetails object on the
0:40 request which you can use as a truthy object to determine if the call was from HTMLX or not.

Talk Python's Mastodon Michael Kennedy's Mastodon