V
V
VaniLuksh2020-03-04 15:02:24
Django
VaniLuksh, 2020-03-04 15:02:24

How to properly connect to an existing database in Django?

There is a DB which it was decided to fill from Django web application.
The database itself is involved in another project, and I would not want to add tables from other django applications to it, which are added when migrating the model from the application to populate the database.

The web application has two models, default and a database model to populate, this model has been inherited by the inspectdb command. However, when migrating, django system tables are still not created in the default database.

1) Is it necessary in general in this case to do the migration of the database model that needs to be filled in?
2) If yes, then how, when migrating the model that is used for filling, to prevent the creation of tables from other Django applications?
3) How, in principle, is it correct to organize this application for filling the database?
4) Maybe it's better to use another "intermediate" model, which will be filled out from the form, and then synchronized with the database that needs to be filled out?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question