S
S
Sergey2018-12-28 11:04:20
Django
Sergey, 2018-12-28 11:04:20

How to create different input fields for one model field?

Good day! There is a form in which there is a field "surname". It is necessary to provide filling in this field in the input form in two forms. For example, so that the user can select it from the TreeView or enter it into the ModelSelect field. How can such duality be realized?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Shatalov, 2018-12-28
@netpastor

Create a form and, when initializing it, set the required widget to this field

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question