Building Maintainable CRUD in Django

Speaker
Speaker: Dennis Stritzke

🧑‍💼 Linkedin Profile

Most Django apps contain a lot of CRUD and most developers either drown in boilerplate or let LLMs generate it. Both paths lead to unmaintainable code. This talk shows a better way: understand the mechanics, pick the right abstractions, and build CRUD that’s beautiful for users and maintainable for you.

We’ll start by exploring a small Django app with Class-based views and ModelForms, Django’s solid starting point. We reimplement the same functionality through plain view functions to expose the underlying mechanics. With the building blocks visible, we generalise toward Neapolitan, a library that serves as an elegant base for this pattern.

From there, we tackle the realities of production-readiness and things like n+1 queries, adding filters, table layouts and navigation flows. Which leads to my Rules of Maintainable CRUD. We’ll discover that by building your app’s CRUD-layer you are becoming a framework author; whether you intend to or not.

You’ll leave with my Rules of Maintainable CRUD, which serve as a mental model for deciding when to use Django’s built-ins, when to reach for a library and when to roll your own. No LLM code generation required.

About Dennis

You find me building software at Kition Software GmbH, managing things at D12S Ventures GmbH, and thinking on the internet.