Conceptual
Login

Polling a Django Background Task's Status from HTMX with hx-trigger every

An element with `hx-get` to a status view and `hx-trigger="every 2s"` swaps in a status partial built from `get_result(id)`. Once the task is SUCCESSFUL or FAILED, the view responds with HTTP 286 and HTMX stops polling.