I’ve been looking over django’s multi-db docs. I’d like to break a few of my models out into a different db. But I really just want those models to ALWAYS live in a particular db. I don’t need special routing. And writing unique routers just to say “Models A, B, and C live in database X, models D, E, and F always live in database Y”.
Is there a simpler way to set defaults like this? For instance, as a model meta field?
There is no
Metafield for this (there was one at some point but it got removed because of the limitations it introduced). You need a database router to control which objects go to what database. In your case the router should be pretty easy to implement.