DatabaseRouter and connections

2017-02-23 Thread Matthieu Guffroy
Hi, For long time we use a DatabaseRouter and a middleware to choose database to use on the fly. With the time going we have now a lot too much databases configurations in our settings. So we have made something to dynamically load database configuration in django.db.connections when they are n

DatabaseRouter, add on runtime add new items to db.connections

2017-02-23 Thread Matthieu Guffroy
Hello, We are using in our system for more than 2 years now, a specific DatabaseRouter allowing us to use multiple databases depending on which clients is connecting. It appears now, that the databases lists start to be really big, and that it becomes bad to be forced to re-deploy our backend t