2025-04-24 –, Main hall
If your users are data modelers themselves, your underlying data model might be extremely generic. What if you still want a model-like interface shaped like those user-defined schemas? This is the story of subclassing QuerySets and REST Framework functionality to produce something a lot like dynamic Django models, only with souped-up annotations supporting creates, updates, and deletes.
Django's ecosystem benefits from high interoperability thanks to pluggable backends and hooks allowing developers to define base QuerySets, for example. But some of this functionality can be difficult to leverage if your application logic involves transformations into a more abstract data model. If you've ever found yourself wishing you could alter and save back a value that was calculated from a complex QuerySet annotation, you've encountered a version of this problem.
In this talk, we'll show an approach to this problem developed for a mature web application framework for the cultural heritage community built with Django:
- The use case and inspiration (including no-ORM and Django-maybe precedents)
- The implementation strategy and the hooks we found most useful to override
- How we thought about the many separation of concerns questions that came up along the way
- Final thoughts about the complexity tradeoffs for these kinds of developer ergonomics features
Intermediate
Topics –Architecture, Productivity, DB, Rest APIs
Django has been an integral part of my journey as a developer from my training in music composition and technology through to building open-source web applications. Django contributor since 2020.
Outside of programming, I compose, cook, and tend to the newest and oldest ends of an ever-elongating queue of books, films, and musical compositions to enjoy--always keeping a good thought for the ones stranded in the middle.