I
I
Ilya Korol2019-06-22 19:09:32
Django
Ilya Korol, 2019-06-22 19:09:32

How to create a model that will be addressed through models.ForeignKey to the model described later?

There are 2 models.
How to create a model that will be addressed through models.ForeignKey to the model described later?
Order must be maintained.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-06-22
@welcome32

You can pass a string class name to ForeignKey :
But it is better to avoid situations in which this may be necessary.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question