J
J
Jekson2019-05-17 10:30:39
Django
Jekson, 2019-05-17 10:30:39

How to implement multiple relationships between models in Django?

Tell me how to implement a connection between one model and several others.
I have

Carrier
  carrier_id
  name 

Partner
  partner_id
  carrier_id
  name

Company
  company_id
  partner_id
  name

Administrator
  entity_type (Сarrier, Partner, Company)
  email

Such things are not done by the standard type of communication, as I understand it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-05-17
@Lepilov

Either through inheritance of models from a common root, or through generalized relations .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question