K
K
Kirill Gorelov2019-02-25 13:36:26
Django
Kirill Gorelov, 2019-02-25 13:36:26

Django models, theoretical question?

Guys, hello.
I'm learning django and I have a question. You can somehow set the fields of the models in one place and call them in the models themselves. Suppose you need 100500 identical models. Just such an idea would fit. Described model fields in one place and just call them in other places. It is also convenient when editing, suppose you need to add one more field to each model.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2019-02-25
@Kirill-Gorelov

This is called inheritance .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question