4 ms·
In Django we can have multiple databases using multiple backends and either the same, different, or overlapping ORM models.
by bayesian_horse 7y ago
In Django we can have multiple databases using multiple backends and either the same, different, or overlapping ORM models.
- babayega2 7y agoIndeed. I recently worked on a legacy project where I don't have the luxury to modify the old database. I ended up using Peewee [0] to access the old database, in conjunction with the normal Django based database and even wrote a simple model that use Peewee [1]. Everything works, even Django Rest Framework associated with the model. [0]: http://docs.peewee-orm.com/en/latest/ http://docs.peewee-orm.com/en/latest/ [1]: https://stackoverflow.com/questions/57602206/mysql-gone-away-with-peewee-as-second-database-in-django/ https://stackoverflow.com/questions/57602206/mysql-gone-away...