1

I have a legacy Django project with a legacy database. That project uses django.contrib.auth.User as the user model. Now I need to write a new Django project and that app has to get access to the legacy database. The problem is that my new Django project also needs a User object. So how do I route django.contrib.auth.user models into the correct database?

Another possible way to do this: is it possible to "bootstrap" a Django app for use inside another project? So if I have a legacy Django app with legacy settings.py, and I want to use the Django model functionality inside a new Django project with new settings.py (and it has its own apps), is there a way to do this?

Marc
  • 3,386
  • 8
  • 44
  • 68
  • use `db-routers`, https://docs.djangoproject.com/en/2.0/topics/db/multi-db/ – JPG Feb 27 '18 at 08:29
  • Possible duplicate of [Django multi-database routing](https://stackoverflow.com/questions/8054195/django-multi-database-routing) – Essex Feb 27 '18 at 08:44

0 Answers0