K
K
Konstantin Kruglov2016-08-13 12:53:04
Django
Konstantin Kruglov, 2016-08-13 12:53:04

How to connect ups and models correctly?

Tell me by example (the code is so-so, do not judge strictly). There is a direct call from search to result. But doing so is wrong. How to create links between apami? Is it correct to use a custom manager in result for this purpose?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Абдулла Мурсалов, 2016-08-13
@k0st1an

В принципе нет ничего страшного, чтобы импортить напрямую. Если есть необходимость, можно по аналогии с кастомной моделью пользователя в django - хранить имя модели в настройках + плюс иметь функцию возвращающую саму модель

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question