Building advanced back-office interfaces using Django & HTMX
09-08, 16:20–16:55 (Europe/Lisbon), Auditorium

Explore a pragmatic approach to enhancing Django's back-office interfaces. Delve into the practical integration of lightweight frameworks like HTMX and AlpineJS to introduce interactivity with minimal JavaScript. This talk focuses on custom generic class-based views, offering insights into CRUD operations, formsets, and advanced techniques for managing Django models. Join me for a comprehensive overview of these techniques, from read-only forms to patching HTMX into the Django Admin, as we redefine Django development practices.

Modern applications often necessitate a back-office interface to facilitate administrative tasks. While Django's generic class-based views are valuable for fundamental CRUD operations, they may fall short when it comes to meeting specific UI/UX requirements.
These views, while reliable for CRUD tasks, tend to lack interactivity due to the absence of JavaScript and their tendency to refresh the entire page upon use.
Traditionally, the go-to solution has been to construct the interface with a frontend framework, but this approach can be resource-intensive and time-consuming.
Now, with the emergence of lightweight frameworks like HTMX and AlpineJS, it's possible to introduce interactivity into your application with minimal JavaScript or reliance on dedicated frontend frameworks. This approach allows you to maintain the interface layout within Django templates and keep the application state on the server.
This presentation explores various use cases for common development patterns in CRUD interfaces and the management of extensive Django models. It places a special emphasis on custom generic class-based views and how to seamlessly integrate them with HTMX to deliver a frontend-like user experience.

Key Topics Covered:
* Leveraging Django's generic class-based views for CRUD functionality.
* Evaluating Formsets and alternative options.
* Comparing HTMX & HATEOAS to Frontend & REST approaches.
* Implementing CRUD operations within a Single View: CreateUpdateDeleteView.
* Achieving inline object manipulation without relying on formsets.
* Handling complex models with multi-step processes using WizardView.
* Presenting form data in read-only mode via the form layout with ReadOnlyFormView.
* Delving into advanced, out-of-scope examples, including Sortable UIs and WebComponents.
* Exploring the possibilities of integrating HTMX into the Django Admin to transform it into a frontend-like experience.

This presentation aims to shed light on how to enhance your Django-based applications with a more interactive and efficient administrative interface, all while minimizing the need for extensive frontend development.

Originally from Porto, Portugal, and holding an Msc. in Networks & Computer Engineering from the University of Porto, I've passionately pursued a career as a versatile freelancer, specializing in the development and maintenance of websites, back-end systems, and mobile applications for a diverse range of small companies. My skill set encompasses a variety of technologies, including PHP, NodeJS, Flutter, Ionic, HTMX, and Django.
Currently, I am fully committed to my role at Evolutio, where I lead the development of comprehensive applications for an array of clients from various sectors. My projects have ranged from creating housing market statistics platforms to crafting CMS applications for housing news and events management, utilizing a combination of Django, SvelteKit, and HTMX.
In my spare time, I enjoy sharing my knowledge through Full-stack Web Development courses, primarily aimed at university students. I am continually expanding my knowledge base, diving deep into topics such as DevOps tools and exploring the ever-evolving landscape of frontend frameworks, with a particular focus on SvelteKit.
When I'm not immersed in code, you can find me enjoying my other passions, including retro video games, fine-tuning my music mixing skills, and exploring the wonders of our world through travel.