S
S
sazhyk2016-12-09 15:00:27
Django
sazhyk, 2016-12-09 15:00:27

Output on ForeinKey page in human readable form?

I do not know how to ask correctly, or form a query in Google. Therefore, I will try to explain on the fingers. Situation. There is an "Employee" model and a "Residence" model. In the employee model, there is a field with ForeinKey for the "Residence" model. Everything would be fine, but I can’t figure out how to display normal names <input type="select">on the page. To make it clear what I'm talking about, I'll attach a screenshot. I understand that the solution to the problem may be the simplest, but I can not find it.fd61c0d35d044f4c904cb1d5b9cc747e.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2016-12-09
@sazhyk

Переопредели метод __str__ у модели

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question