Single Model.py with Multiple Classes and Multiple Databases

Notice how your router tests receive either a model or an instance as a parameter. In those tests, you’re currently using the <object>._meta.app_label as the data you’re examining within those tests to determine the database to use.

However, you’re not required or limited to only checking the app_label within your tests.

You can test any attribute of the <object> (model class or instance). This means you could write a test that checks attributes such as <object>._meta.model_name. What you test for in a router is entirely up to you.