M
M
mkone1122021-03-03 21:54:55
PostgreSQL
mkone112, 2021-03-03 21:54:55

How to find relationship between tables/models?

The project has two models (tables), I want to filter the records of one model, according to the values ​​of the other. The models are not directly related, there are a total of a thousand models in the project. How to find a connection between them?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mkone112, 2021-06-09
@mkone112

We select the necessary tables in pycharm and build a diagram - only related models will fall into it and nothing more.

D
Dr. Bacon, 2021-03-03
@bacon

total in the project for a thousand models
this is hell. Stupidly sit down and make out connections. Perhaps visualization through https://django-extensions.readthedocs.io/en/latest... or other software that builds on the database will help, but there are doubts because of such a bunch of models.
PS In the python's console, you can still see a specific object, through tab completion, and probably in smart IDEs too. Sit down and spin.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question