S
S
Sergey Nizhny Novgorod2017-01-20 03:38:41
Django
Sergey Nizhny Novgorod, 2017-01-20 03:38:41

What is the best way to do relationships between models in Django?

Hello everyone
Now I'm faced with the fact that in a large number of videos from the bourgeoisie, for links in the model they use the ContentType framework, and not the usual Forenkey, etc. In the mail.ru report, examples were also given with ContentType. So, in summary, what is the best thing to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2017-01-20
@sim3x

FK
M2M

S
Swartex, 2017-01-20
@Swartex

Relationships between models in Django

Z
zelsky, 2017-01-20
@zelsky

depending on connections. If for example you need to store the entire object from other models in the model, then you need to use ContentType.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question