Django and HTMX #6 (part 2) - Building a Sortable Drag and Drop Interface

In this video, we will extend our example to allow the user to have an ordering to their list of movies. We are going to use the library in conjunction with HTMX and Django to achieve this. This is the second of two videos on this. In this video we will modify views to work with the new M2M through model, and will add functionality that allows us to persist list ordering to the database for each user’s list. The final code for this is on the “htmx6.2“ branch on the Github link below. 📌 Chapters: 00:00 Intro 01:08 Modifying views to work with user films M2M model 05:29 Modifying templates 06:18 Creating default order function 08:35 Adding endpoint for HTMX post request 15:55 Re-ordering items on delete 19:24 Outro 📖 Blog: 👾 Github: 🐦 Twitter: ☕️ Ko-Fi: 📚 Further reading and information below: CDN: #cdn Django M2M fields: https://do
Back to Top