Postscript
For those who don’t know the context, I’m suggesting you should just use Custom QuerySets as your âservice layerâ, instead of a hand-coded repository pattern. See also Against service layers in Django.
Also, it’s worth noting that the evolution of QuerySets in Django itself wasn’t so different from some of these steps.