Re: Let the model define the database with a custom router

2017-12-22 Thread gernot . cseh
I have the same problem as Stodge. What I know right know is that the method parameters of *allow_migrate* changed from *def allow_migrate(self, db, model) *to *def allow_migrate(self, db, app_label, model_name=None, **hints). *Since that change, you don't have any reference to a model class an

Let the model define the database with a custom router

2017-12-15 Thread Stodge
I'm porting a website from Django 1.6.x to 1.11 and I'm hitting a problem with my custom router. Some models define a custom attribute defining which database it will reside in: class MyModel(models.Model): DATABASE_NAME = "foo" This worked in our custom router in 1.6.x but not in 1.11. The