Friday, December 22, 2017

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

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 any more. Just strings parameters but no objects.

I've tried to gather a model class instance from that parameters in many ways, no luck so far. What you get sometimes is a class object in hints['models'], but too late to useful for our case.

If someone more skilled can help us out, very very welcome!

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment